Update 'RevProxyAdvanced.sh'
This commit is contained in:
@@ -135,20 +135,21 @@ if [ $domain_setup = 1 ]; then
|
||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||
server {
|
||||
listen 80;
|
||||
server_name $domain www.$domain;
|
||||
|
||||
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 / {
|
||||
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 ~ \.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 ~ \.(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 ~ /\.ht {
|
||||
@@ -160,6 +161,7 @@ server {
|
||||
#ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;
|
||||
#include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user