Update 'RevProxySimple.sh'
This commit is contained in:
@@ -39,19 +39,18 @@ cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||
server {
|
||||
listen 80;
|
||||
server_name $domain www.$domain;
|
||||
root /var/www/$domain/html/;
|
||||
root /var/www/$domain/html;
|
||||
index index.php index.htm index.html;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.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;
|
||||
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 {
|
||||
@@ -74,8 +73,8 @@ ln -s /etc/nginx/sites-available/"$domain" /etc/nginx/sites-enabled/"$domain"
|
||||
apt install -y apache2
|
||||
mv /etc/apache2/ports.conf /etc/apache2/ports.conf.default
|
||||
echo "Listen 127.0.0.1:8080" | tee /etc/apache2/ports.conf
|
||||
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/"$domain".conf
|
||||
cat <<EOF > /etc/apache2/sites-available/"$domain".conf
|
||||
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/"$domain.conf"
|
||||
cat <<EOF > /etc/apache2/sites-available/"$domain.conf"
|
||||
<VirtualHost *:8080>
|
||||
ServerAdmin $email
|
||||
ServerName $domain
|
||||
|
||||
Reference in New Issue
Block a user