• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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