%PDF- %PDF-
Direktori : /etc/nginx/sites-enabled/ |
Current File : //etc/nginx/sites-enabled/klubovnaostrava |
server { listen 10.27.27.5:443 ssl http2; server_name klubovnaostrava.varak.net; client_max_body_size 50m; root /www/klubovnaostrava/test; index index.php; include ssl_params; ssl_certificate /etc/letsencrypt/live/klubovnaostrava.varak.net/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/klubovnaostrava.varak.net/privkey.pem; # managed by Certbot set $cache_uri $request_uri; # POST requests and urls with a query string should always go to PHP if ($request_method = POST) { set $cache_uri 'null cache'; } if ($query_string != "") { set $cache_uri 'null cache'; } # Don't cache uris containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $cache_uri 'null cache'; } # Don't use the cache for logged in users or recent commenters if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $cache_uri 'null cache'; } # Use cached or actual file if they exists, otherwise pass request to WordPress location / { try_files /.cache/supercache/$http_host/$cache_uri/index-https.html /.cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php ; } # location / { # # This is cool because no php is touched for static content. # # include the "?$args" part so non-default permalinks doesn't break when using query string # try_files $uri $uri/ /index.php?$args; # #try_files $uri $uri/ /index.php?q=$uri&$args; # } location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:7083; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /www/klubovnaostrava/test$fastcgi_script_name; } rewrite /wp-admin$ $scheme://$host$uri/ permanent; } server { if ($host = klubovnaostrava.varak.net) { return 301 https://$host$request_uri; } # managed by Certbot listen 10.27.27.5:80; server_name klubovnaostrava.varak.net; rewrite ^/(.*) https://klubovnaostrava.varak.net$request_uri permanent; } ############## TEST2 server { listen 10.27.27.5:443 ssl http2; server_name klubovnaostrava2.varak.net; client_max_body_size 50m; root /www/klubovnaostrava/test2; index index.php; include ssl_params; ssl_certificate /etc/letsencrypt/live/klubovnaostrava.varak.net/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/klubovnaostrava.varak.net/privkey.pem; # managed by Certbot set $cache_uri $request_uri; # POST requests and urls with a query string should always go to PHP if ($request_method = POST) { set $cache_uri 'null cache'; } if ($query_string != "") { set $cache_uri 'null cache'; } # Don't cache uris containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $cache_uri 'null cache'; } # Don't use the cache for logged in users or recent commenters if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $cache_uri 'null cache'; } # Use cached or actual file if they exists, otherwise pass request to WordPress location / { try_files /.cache/supercache/$http_host/$cache_uri/index-https.html /.cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php ; } # location / { # # This is cool because no php is touched for static content. # # include the "?$args" part so non-default permalinks doesn't break when using query string # try_files $uri $uri/ /index.php?$args; # #try_files $uri $uri/ /index.php?q=$uri&$args; # } location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:7083; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /www/klubovnaostrava/test2$fastcgi_script_name; } rewrite /wp-admin$ $scheme://$host$uri/ permanent; } server { if ($host = klubovnaostrava2.varak.net) { return 301 https://$host$request_uri; } # managed by Certbot listen 10.27.27.5:80; server_name klubovnaostrava2.varak.net; rewrite ^/(.*) https://klubovnaostrava2.varak.net$request_uri permanent; } ############# PRETIX ################ server { listen 10.27.27.5:443 ssl http2; server_name pretix.klubovnaostrava.cz; include ssl_params; ssl_certificate /etc/letsencrypt/live/pretix.klubovnaostrava.cz/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/pretix.klubovnaostrava.cz/privkey.pem; # managed by Certbot location / { proxy_pass http://127.0.0.1:8346; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $http_host; proxy_hide_header x-frame-origin; add_header Content-Security-Policy "frame-ancestors 'self' https://klubovnaostrava.varak.net https://klubovnaostrava.cz https://www.klubovnaostrava.cz"; } location /media/ { alias /var/pretix/data/media/; expires 7d; # access_log off; } location ^~ /media/cachedfiles { deny all; return 404; } location ^~ /media/invoices { deny all; return 404; } location /static/ { alias /var/pretix/venv/lib/python3.10/site-packages/pretix/static.dist/; # access_log off; expires 365d; add_header Cache-Control "public"; } } server { listen 10.27.27.5:443 ssl http2; server_name pretix.varak.net; include ssl_params; ssl_certificate /etc/letsencrypt/live/pretix.varak.net/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/pretix.varak.net/privkey.pem; # managed by Certbot location / { proxy_pass http://127.0.0.1:8346; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $http_host; proxy_hide_header x-frame-origin; add_header Content-Security-Policy "frame-ancestors 'self' https://klubovnaostrava.varak.net https://klubovnaostrava.cz https://www.klubovnaostrava.cz"; } location /media/ { alias /var/pretix/data/media/; expires 7d; # access_log off; } location ^~ /media/cachedfiles { deny all; return 404; } location ^~ /media/invoices { deny all; return 404; } location /static/ { alias /var/pretix/venv/lib/python3.10/site-packages/pretix/static.dist/; # access_log off; expires 365d; add_header Cache-Control "public"; } } server { if ($host = pretix.klubovnaostrava.cz) { return 301 https://$host$request_uri; } # managed by Certbot listen 10.27.27.5:80; server_name pretix.klubovnaostrava.cz; rewrite ^/(.*) https://pretix.varak.net$request_uri permanent; }