Created
March 16, 2014 06:02
-
-
Save danielmelogpi/9579212 to your computer and use it in GitHub Desktop.
server part for NGINX configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name domain.tk; | |
access_log logs/danielmelo.access.log ;# main; | |
location / { | |
try_files $uri $uri/ index.php index.html =404; | |
root /var/www/nginx/danielmelo; | |
index index.php index.html index.htm; | |
log_not_found on; | |
} | |
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { | |
expires max; | |
log_not_found off; | |
} | |
location ~ \.(php|phtml)$ { | |
try_files $uri index.php =404; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
root /var/www/nginx/danielmelo/; | |
fastcgi_param SCRIPT_FILENAME /var/www/nginx/danielmelo$fastcgi_script_name; | |
log_not_found on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment