cd /etc/nginx/sites-available
I noticed that one of the sites can be reached and browser from plain IP addressThe fix is to put on the top of configuration:
server {
listen 80 default_server;
return 403;
}
For example /etc/nginx/sites-available/mp4.catonrug.net looks like:
server {
listen 80 default_server;
return 403;
}
server {
server_name mp4.catonrug.net;
listen 80;
root /var/www/mp4.catonrug.net/;
access_log /var/log/nginx/mp4.catonrug.net.com-access.log;
error_log /var/log/nginx/mp4.catonrug.net-error.log;
index index.php index.html index.htm;
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
No comments:
Post a Comment