Redirect port to a particular folder Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
lpcs007
Posts: 4
Joined: Fri Dec 16, 2016 3:17 am

Redirect port to a particular folder

Postby 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.

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

Re: Redirect port to a particular folder  Topic is solved

Postby 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.

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

Re: Redirect port to a particular folder

Postby 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.

skurudo
VestaCP Team
Posts: 7531
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: Redirect port to a particular folder

Postby skurudo » Wed May 17, 2017 6:49 am

lpcs007, check via telnet from ssh console -> telnet -> open whatever
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now

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

Re: Redirect port to a particular folder

Postby 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.


Return to “Web Server”



Who is online

Users browsing this forum: No registered users and 4 guests