Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Reverse Proxy Setup

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
Vincenzo
Posts: 4
Joined: Thu Mar 05, 2015 6:04 pm

Reverse Proxy Setup
  • Quote

Post by Vincenzo » Thu Mar 05, 2015 6:14 pm

Hi, I have several domains that use port # 8069, 8200 and 8300... In Apache I know how to create the reverse proxy however recently I installed Vesta CP and I cant seem to figure out how to make the reverse proxy work using Vesta CP.
I allowed the port to work from the firewall so I can test it and it works fine, however where do I add the reverse proxy info? Can someone please help me?

Thank you,


Vincenzo
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Reverse Proxy Setup
  • Quote

Post by skurudo » Thu Mar 05, 2015 8:05 pm

You already have reverse proxy - nginx
In conf file make port, which you need

For example - /home/admin/conf/web/nginx.conf

location / {
proxy_pass http://ip:port-you-need;

Make sure you have application on this port in apache or something else
Top

Vincenzo
Posts: 4
Joined: Thu Mar 05, 2015 6:04 pm

Re: Reverse Proxy Setup
  • Quote

Post by Vincenzo » Thu Mar 05, 2015 8:45 pm

when I pasted the script you gave me, and added the port the nginx server wont restart. any ideas? can you give a complete sample?
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Reverse Proxy Setup
  • Quote

Post by skurudo » Fri Mar 06, 2015 1:56 am

Because It's non complete config, man. Don't copy-paste all you see on forum, if you don't completly understand, what you do. It's a bad habbit.

First add domain, then edit config.
There is location section (search for this part):

Code: Select all

    location / {
        proxy_pass      http://your-ip:your-port;
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|$
            root           /home/admin/web/juvia.ru/public_html;
            access_log     /var/log/apache2/domains/domain.ru.log combined;
            access_log     /var/log/apache2/domains/domain.ru.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }
Read a litttle about nginx - http://wiki.nginx.org/Configuration
Top

Vincenzo
Posts: 4
Joined: Thu Mar 05, 2015 6:04 pm

Re: Reverse Proxy Setup
  • Quote

Post by Vincenzo » Fri Mar 06, 2015 11:42 pm

Thank you, worked like a charm
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password