Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name your.domain.tld;
- return 301 https://$host$request_uri;
- }
- server {
- listen 443 ssl http2;
- server_name your.domain.tld;
- root /config/www/folder;
- index index.html index.htm index.php;
- include /config/nginx/ssl.conf;
- client_max_body_size 0;
- allow 192.168.88.0/24;
- allow 10.253.0.1/24;
- deny all;
- error_page 403 /error403.html;
- location = /error403.html {
- root /config/www/folder;
- allow all;
- }
- location = /magicword.mp4 {
- root /config/www/folder;
- allow all;
- }
- location = /favicon.ico {
- root /config/www/folder;
- allow all;
- }
- location / {
- proxy_pass https://IP:PORT;
- proxy_buffering off;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection $http_connection;
- access_log off;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # With php7-cgi alone:
- fastcgi_pass 127.0.0.1:9000;
- # With php7-fpm:
- #fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include /etc/nginx/fastcgi_params;
- }
- }
Add Comment
Please, Sign In to add comment