Hello,
I use Nginx Catch-All Host As Front End To Apache (for my static files) :
Code:
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3)$ {
root /var/www/$host/web;
access_log off;
expires 30d;
I prefer that my domain name appear as
www., but with the How TO, all domains starting with www will be redirected to
http://domain.
In my panel, i set up my website with auto subdomain "www". So with this line "root /var/www/$host/web;" in
/etc/nginx/sites-available/default it's returns a 404 error for the static files on my websites. Is normal because $host =
www.mydomain.com and ispconfig is configure for mydomain.com
If i replace manualy $host by mydomain.com, it works. However, I 've several websites.
The solution would be to rename the $host variable into
/etc/nginx/sites-available/default, but is that possible? Such as php $host = str_replace('.www', '', $host);
Thanks ! (again

)
Recent comments
1 day 6 hours ago
1 day 6 hours ago
1 day 11 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 20 hours ago
2 days 51 min ago
2 days 7 hours ago
2 days 11 hours ago
2 days 13 hours ago