Nginx – Proxy for Apache

site.conf:

server {
    listen 80;  

    root /var/www/html/site;
    index index.php;

    server_name artem.services;

    location / {
        try_files $uri $uri/ /index.php;
    }

    location ~ \.php$ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:8080;
    }

    location ~ /\.ht {
        deny all;
    }
}

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments