1,084 reputation
1717
bio website ad7six.com
location Spain
age 38
visits member for 3 years
seen 8 mins ago

Professional web developer.

Mostly php (CakePHP team member), some node.js, various databases/datastores - and a dash of linux (arch with a smidgen of ubuntu server).


1h
comment apache mod_rewrite variable hostnames with one redirect?
reason = negative-lookahead is a zero-width match - removed the $ from the regexes - What you can expect. Only accept an answer after testing it's correct =). "user contributions licensed under cc by-sa 3.0 with attribution required" though I don't think anyone is going to care for a couple of rewrite rules.
1h
revised apache mod_rewrite variable hostnames with one redirect?
Remove $ from regexes with negative lookahead - a lookahead is a zero-width match
3h
revised apache mod_rewrite variable hostnames with one redirect?
warn on using negative matches
3h
revised apache mod_rewrite variable hostnames with one redirect?
Update following question editing
13h
comment nginx mp4 hotlink protection in folder
Define "doesn't work". You probably need to show more config, to look at the response headers (and show them) and see the docs for valid_referers.
20h
comment NGINX and Chrome
possible duplicate of Weird http -> https redirection although not configured
1d
awarded  Yearling
1d
comment 124 emails sent at once while one should be sent every five minutes by cron if a certain web service stops running
@utrecht no. man 5 crontab and look for MAILTO. example. Does not explain the number of emails - logically if there were 124 emails received and this is the only script sending emails - it was called 124 times. 123 not via cron.
1d
comment (111: Connection refused) while connecting to upstream - Opsworks Rails 4
that eliminates one cause - how about the other?
1d
comment 124 emails sent at once while one should be sent every five minutes by cron if a certain web service stops running
why would you pipe some output to mail instead of dumping to stdout and letting cron send the mail?
1d
comment (111: Connection refused) while connecting to upstream - Opsworks Rails 4
unicorn is not running, or the path to the socket is wrong.
2d
answered apache mod_rewrite variable hostnames with one redirect?
Jan
23
comment Why virtualhost is not accessible from the other ips?
"It" ? Step one is to verify that you are attempting to connect to your server, when on "any other machine". e.g. ping test.mydomain.ca - is that your server's IP? If it is what's in your server logs? if it's not - you're asking the wrong question.
Jan
23
answered How can I block requests with the wrong Host header set?
Jan
23
comment Why virtualhost is not accessible from the other ips?
define "does not work" please. does it resolve?
Jan
23
comment php-fpm using 100% CPU and nginx gives 404
@Салман "better". Op cache (which you should pretty much always have enabled btw) only stops php needing to parse php files - it does absolutely nothing to speed up e.g. the time spent establishing a connection to the db, db queries, disk i/o, time spent by the application performing calculations etc. etc. If a page loads in 2s without opcache, turning it on might bring that down to 1.95s - it significantly reduces the time parsing php files - which typically make up very little of "sizable" php scripts.
Jan
23
comment How to redirect old HTTPS URLs to new location HTTPS, on Apache?
Clients need to receive a valid ssl certificate for https://old.example.com, otherwise their request goes no further and they will not be redirected to https://apps.example.com/old (their browser won't do anything except spit out a warning about the ssl certificate mis-match). You need to look at the headers for requests - you may well find that the problem is not the config in the question, but that there is a subsequent redirect you're not expecting.
Jan
23
comment php-fpm using 100% CPU and nginx gives 404
All true. The fastcgi_cache settings suggest the expectation for only the first request to actually hit php (if urls are not unique per user) and thereafter it'd be treated the same as a static file. Receiving a 404 suggests either poor debugging (it's actually a 5xx, and there's nothing more really to be said) OR it really is a 404 - which would be a bit weird IMO. and warrants some further investigation (at least for the sake of curiosity).
Jan
23
comment php-fpm using 100% CPU and nginx gives 404
You are not demonstrating "the problem". Start from the basis that if you can't show a server-side error message there is missing information - read your log files. How are you performing a 500 user load test, and when it triggers an error - exactly what error (response headers and body) do you get? You also need to show your php-fpm config (e.g. the contents of /etc/php5/fpm/pool.d/www.conf - without the comments) but a 500 user test (do you mean 500 concurrent users?) can quite easily saturate any low powered machine running a typical OTS php project.
Jan
22
comment Accidentally set expires max in http block
1. No 2. You ask/tell them. The only way you can do anything from the server is get users to access a different url.