Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.sitename.net sitename.net;
- root /var/www/sitename.net/public;
- index index.html index.htm index.php;
- access_log /var/www/sitename.net/access.log;
- error_log /var/www/sitename.net/error.log;
- # Directives to send expires headers and turn off 404 error logging.
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- access_log off;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- ## Disable viewing .htaccess & .htpassword
- location ~ /\.ht {
- deny all;
- }
- location ~ ^/info/.* {
- allow 192.168.1.88/32; # To give one ip access
- ## allow 192.168.1.0/24; # To give a whole network access
- deny all;
- include /etc/nginx/php.conf;
- }
- include /etc/nginx/php.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment