Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- # You should look at the following URL's in order to grasp a solid understanding
- # of Nginx configuration files in order to fully unleash the power of Nginx.
- # http://wiki.nginx.org/Pitfalls
- # http://wiki.nginx.org/QuickStart
- # http://wiki.nginx.org/Configuration
- server {
- server_name www.blueseed.co;
- return 301 $scheme://blueseed.com$request_uri;
- }
- map $uri $uri_no_dot_html {
- default $uri;
- /faq.html /faq/;
- /quick-facts.html /quick-facts/;
- /about-us.html /about-us/;
- /start-up-survey /come-aboard/; # Added 2012-09-24
- /start-up-survey/ /come-aboard/; # Added 2012-09-24
- /startup-survey /come-aboard/; # doesn't match '/startup-survey/'. Added 2012-09-17
- /startup-survey/ /come-aboard/; # also catches /startup-survey/results. Added 2012-09-17
- }
- server {
- server_name blueseed.com bluesee.com;
- # do faq.html & co. maps - http://wiki.nginx.org/HttpMapModule
- if ($uri_no_dot_html != $uri) {
- rewrite ^ $uri_no_dot_html permanent;
- }
- root /var/www/blueseed-wp;
- access_log /var/www/blueseed-wp/logs/access.log;
- error_log /var/www/blueseed-wp/logs/error.log error;
- location / {
- # First attempt to serve request as file, then as directory, then fall back to index.html
- try_files $uri $uri/ /index.php?$args;
- index index.php;
- }
- # deny access to hidden files
- location ~ /\. {
- access_log off;
- log_not_found off;
- deny all;
- }
- # cache image files
- location ~* \.(jpe?g|gif|png|css|js|ico)$ {
- access_log off;
- expires 1w;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- #
- # # With php5-cgi alone:
- fastcgi_pass 127.0.0.1:9000;
- # # With php5-fpm:
- # fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment