• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Plesk Reverse proxy

Erwin Fiten

Basic Pleskian
Hi all,

I'm trying to achieve the following :

I have a website running on a homeinternet connection, on a different port :
it's reachable over the internet :
http://<IP>:8080

Now i want to have a subdomain directy showing this site.
So when I browse :

http://sub.domain.com
I get the webpage.

For now I do this with the reverse proxy from my synology, that works fine, but is this also possible within PLESK ?

Erwin
 
If your site is accessible from internet, you can just try to use Forwarding hosting type for your subdomain in plesk and use your http://<IP>:8080 as destination address.
 
I tested this, but modern browsers doen't support frames anymore, so I had to choose the 'move permanently'
But in this case the other URL becomes visible, and this is not what I want.
Therefore I was using reverse proxy with my Synology.
Any other way to do this, so the original URL "http://sub.domain.com" will be visible ?

Erwin
 
You can create a file called /etc/nginx/conf.d/zz090synology.conf and use that....
point synology.fiten.com to the Plesk server

mkdir -p /var/log/nginx/ownservices
chown nginx:nginx /var/log/nginx/ownservices
cat /etc/nginx/conf.d/zz090synology.conf


Code:
server {
    listen <pleskip>:80;
    server_name synology.fiten.com;

    error_log /var/log/nginx/ownservices/error.log;
    access_log /var/log/nginx/ownservices/access.log combined;

    location / {
        proxy_pass http://<synology-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;
    }
}
 
Back
Top