Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Default server configuration
- #
- #thijs365.com
- server {
- server_name thijs365.com www.thijs365.com;
- #listen 80 default_server;
- #listen [::]:80 default_server;
- #NOT restrict the maximum file size to something small
- client_max_body_size 100M;
- #if ($host != "thijs365.com") {
- # return 444;
- #}
- # SSL configuration
- listen 443 ssl default_server http2;
- listen [::]:443 ssl default_server http2;
- include /etc/nginx/certs/ssl.conf;
- #listen [::]:443 ssl default_server;
- #Note: You should disable gzip for SSL traffic.
- #See: https://bugs.debian.org/773332
- #Read up on ssl_ciphers to ensure a secure configuration.
- #See: https://bugs.debian.org/765782
- # Self signed certs generated by the ssl-cert package
- # Don't use them in a production server!
- #include snippets/snakeoil.conf;
- root /var/www/thijs365.com;
- # Add index.php to the list if you are using PHP
- index index.html index.htm index.php;
- error_page 404 /errors/404.html;
- error_page 403 /errors/403.html;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- try_files $uri $uri/ =404;
- #allow 192.186.0.0;
- #allow 127.0.0.1;
- #deny all;
- keepalive_timeout 0;
- }
- #WebDAV config
- #location /files {
- # root /var/dav;
- # client_body_temp_path /var/dav/temp;
- # dav_methods PUT DELETE MKCOL COPY MOVE;
- # dav_ext_methods PROPFIND OPTIONS;
- # create_full_put_path on;
- # dav_access user:rw group:rw all:rw;
- # autoindex on;
- # auth_basic "restricted";
- # auth_basic_user_file /etc/nginx/authfiles/webdavpasswd;
- #}
- #Webdav was a fucking disaster, just use VPN + SFTP or Guacamole SFTP
- location ~ /\. {
- access_log off;
- log_not_found off;
- deny all;
- }
- location ~ ~$ {
- access_log off;
- log_not_found off;
- deny all;
- }
- location /notyourstuff/fuckoff/{
- auth_basic "Admin Login";
- auth_basic_user_file /etc/nginx/authfiles/pma_pass;
- }
- location /test/ {
- # auth_basic "This directory is for testing purposes.";
- # auth_basic_user_file /etc/nginx/authfiles/testpass;
- index index.html index.php index.asp index.aspx home.html;
- }
- include /etc/nginx/php.conf;
- location /notyourstuff/fuckoff {
- index index.php;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
- }
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- server_name thijs365.com www.thijs365.com;
- #if ($host != "thijs365.com") {
- # return 444;
- #}
- return 301 https://$server_name$request_uri;
- }
- # Virtual Host configuration for example.com
- #
- # You can move that to a different file under sites-available/ and symlink that
- # to sites-enabled/ to enable it.
- #
- #server {
- # listen 80;
- # listen [::]:80;
- #
- # server_name example.com;
- #
- # root /var/www/example.com;
- # index index.html;
- #
- # location / {
- # try_files $uri $uri/ =404;
- # }
- #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement