Update 'RevProxyAdvanced.sh'
This commit is contained in:
@@ -135,22 +135,23 @@ if [ $domain_setup = 1 ]; then
|
|||||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name $domain www.$domain;
|
|
||||||
root /var/www/$domain/html;
|
root /var/www/$domain/html;
|
||||||
index index.php index.htm index.html;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
server_name $domain www.$domain;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files \$uri \$uri/ /index.php;
|
proxy_pass http://$server_ip:8080;
|
||||||
|
proxy_set_header X-Real-IP \$remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For \$remote_addr;
|
||||||
|
proxy_set_header Host \$host;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)(\\n|\?ver=[0-9.])\$ {
|
||||||
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php\$ {
|
|
||||||
proxy_pass http://$server_ip:8080;
|
|
||||||
proxy_set_header Host \$host;
|
|
||||||
proxy_set_header X-Real-IP \$remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /\.ht {
|
location ~ /\.ht {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
@@ -160,6 +161,7 @@ server {
|
|||||||
#ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;
|
#ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;
|
||||||
#include /etc/letsencrypt/options-ssl-nginx.conf;
|
#include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user