Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # You may add here your
- # server {
- # ...
- # }
- # statements for each of your virtual hosts to this file
- ##
- # 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
- #
- # Generally, you will want to move this file somewhere, and start with a clean
- # file but keep this around for reference. Or just disable in sites-enabled.
- #
- # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
- ##
- server {
- listen 80;
- listen 443 ssl;
- ssl_certificate /etc/nginx/CERTS/websitename.net.pem;
- ssl_certificate_key /etc/nginx/CERTS/websitename.net.key;
- root /var/www/html;
- index index.php index.html index.htm;
- server_name websitename.net www.websitename.net;
- location / {
- try_files $uri $uri/ /index.php?q=uri&$args;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ /\. {
- deny all;
- }
- location ~* /(?:uploads|files)/.*\.php$ {
- deny all;
- }
- }
- # another virtual host using mix of IP-, name-, and port-based configuration
- #
- #server {
- # listen 8000;
- # listen somename:8080;
- # server_name somename alias another.alias;
- # root html;
- # index index.html index.htm;
- #
- # location / {
- # try_files $uri $uri/ =404;
- # }
- #}
- # HTTPS server
- #
- #server {
- # listen 443;
- # server_name localhost;
- #
- # root html;
- # index index.html index.htm;
- #
- # ssl on;
- # ssl_certificate cert.pem;
- # ssl_certificate_key cert.key;
- #
- # ssl_session_timeout 5m;
- #
- # ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
- # ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
- # ssl_prefer_server_ciphers on;
- #
- # location / {
- # try_files $uri $uri/ =404;
- # }
- #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement