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

Redirect port to a particular folder

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
lpcs007
Posts: 7
Joined: Fri Dec 16, 2016 3:17 am

Redirect port to a particular folder
  • Quote

Post by lpcs007 » Mon May 15, 2017 3:56 pm

Hello friends,

I have a client that needs to open port 85 and access the files of a certain folder. I added the port on the server firewall, but it did not work. How do I open port 85 and redirect to a particular folder?

Thank you.
Top

Trentor
Posts: 84
Joined: Fri Apr 25, 2014 6:42 pm

Re: Redirect port to a particular folder
  • Quote

Post by Trentor » Mon May 15, 2017 7:37 pm

You have to create a virtualhost.

Apache:

Code: Select all

/home/admin/conf/web/httpd.conf

<VirtualHost your.ip:85>

	Your config

</VirtualHost>
You can copy and modify accordingly the config of other existing virtualhost. If you want to use https, add your virtualhost to shttp.conf.

nginx:

Code: Select all

/home/admin/conf/web/nginx.conf

server {
    listen      your.ip:85;
    
    	Your config

}
Same as before, copy another virtualhost and modify it according to your needs. snginx.conf if you want https.
Top

lpcs007
Posts: 7
Joined: Fri Dec 16, 2016 3:17 am

Re: Redirect port to a particular folder
  • Quote

Post by lpcs007 » Wed May 17, 2017 3:29 am

Trentor wrote:You have to create a virtualhost.

Apache:

Code: Select all

/home/admin/conf/web/httpd.conf

<VirtualHost your.ip:85>

	Your config

</VirtualHost>
You can copy and modify accordingly the config of other existing virtualhost. If you want to use https, add your virtualhost to shttp.conf.

nginx:

Code: Select all

/home/admin/conf/web/nginx.conf

server {
    listen      your.ip:85;
    
    	Your config

}
Same as before, copy another virtualhost and modify it according to your needs. snginx.conf if you want https.

Thank you for your help. Unfortunately I could not. I duplicated the virtualhost by changing the port to 85, but it did not work. It looks like the port is closed on the server. How do I check? Note: I already inserted port 85 into the firewall.
Top

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

Re: Redirect port to a particular folder
  • Quote

Post by skurudo » Wed May 17, 2017 6:49 am

lpcs007, check via telnet from ssh console -> telnet -> open whatever
Top

Trentor
Posts: 84
Joined: Fri Apr 25, 2014 6:42 pm

Re: Redirect port to a particular folder
  • Quote

Post by Trentor » Wed May 17, 2017 9:36 pm

lpcs007 wrote:Thank you for your help. Unfortunately I could not. I duplicated the virtualhost by changing the port to 85, but it did not work. It looks like the port is closed on the server. How do I check? Note: I already inserted port 85 into the firewall.
You can do what you've been told by Skurudo or use one of the multiples online sites to check open ports.

Or use nmap from another server.
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