Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Config I added that doesn't work. Commented it out to save data ###
- #server {
- #listen 443 ssl;
- # server_name mail.example.com;
- # ssl_certificate /etc/letsencrypt/live/mail.example.com/fullchain.pem;
- # ssl_certificate_key /etc/letsencrypt/live/mail.example.com/privkey.pem;
- # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- # ssl_prefer_server_ciphers on;
- # ssl_dhparam /etc/ssl/certs/dhparam.pem;
- # ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
- # ssl_session_timeout 1d;
- # ssl_session_cache shared:SSL:50m;
- # ssl_stapling on;
- # ssl_stapling_verify on;
- # add_header Strict-Transport-Security max-age=15768000;
- # client_max_body_size 30m;
- # server_name mail.example.com;
- # root /usr/share/nginx/html;
- # index index.php index.html index.htm;
- # port_in_redirect off;
- # location ~ /.well-known {
- # allow all;
- # }
- ### Original File Begins Here ###
- server {
- listen 80 default_server;
- listen [::]:80 default_server ipv6only=on;
- client_max_body_size 40M;
- root /usr/share/nginx/html;
- index index.php index.html index.htm;
- # Make site accessible from http://localhost/
- #server_name localhost;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- #try_files $uri $uri/ =404;
- try_files $uri $uri/ /index.php?$args;
- # Uncomment to enable naxsi on this location
- # include /etc/nginx/naxsi.rules
- }
- # location ~ /.well-known {
- # allow all;
- # }
- location /staff {
- auth_basic "Closed Website";
- auth_basic_user_file /etc/nginx/staff_pass;
- }
- location /nothingtosee {
- allow x.x.x.x;
- allow 10.1.1.0/24;
- deny all;
- auth_basic "Closed Website";
- auth_basic_user_file /etc/nginx/pma_pass;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 256 4k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_read_timeout 240;
- }
- location /intranet/v3 {
- index index.php index.html index.htm;
- try_files $uri $uri/ /index.php?$args;
- allow 10.1.1.0/24;
- allow 10.1.2.0/24;
- allow 10.1.3.0/24;
- allow 10.1.4.0/24;
- allow 10.1.5.0/24;
- allow 10.1.18.0/24;
- deny all;
- deny 10.1.10.0/24;
- deny 10.1.18.0/24;
- }
- location /squirrelmail {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/squirrelmail/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- include /etc/nginx/fastcgi_params;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 256 4k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- }
- location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /webmail {
- rewrite ^/* /squirrelmail last;
- } }
- # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
- #location /RequestDenied {
- # proxy_pass http://127.0.0.1:8080;
- #}
- #error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- #error_page 500 502 503 504 /50x.html;
- #location = /50x.html {
- # root /usr/share/nginx/html;
- #}
- # 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;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement