Redirect port to a particular folder
Redirect port to a particular folder
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.
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.
Re: Redirect port to a particular folder
You have to create a virtualhost.
Apache:
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:
Same as before, copy another virtualhost and modify it according to your needs. snginx.conf if you want https.
Apache:
Code: Select all
/home/admin/conf/web/httpd.conf
<VirtualHost your.ip:85>
Your config
</VirtualHost>
nginx:
Code: Select all
/home/admin/conf/web/nginx.conf
server {
listen your.ip:85;
Your config
}
Re: Redirect port to a particular folder
Trentor wrote:You have to create a virtualhost.
Apache:
You can copy and modify accordingly the config of other existing virtualhost. If you want to use https, add your virtualhost to shttp.conf.Code: Select all
/home/admin/conf/web/httpd.conf <VirtualHost your.ip:85> Your config </VirtualHost>
nginx:
Same as before, copy another virtualhost and modify it according to your needs. snginx.conf if you want https.Code: Select all
/home/admin/conf/web/nginx.conf server { listen your.ip:85; Your config }
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.
Re: Redirect port to a particular folder
lpcs007, check via telnet from ssh console -> telnet -> open whatever
Re: Redirect port to a particular folder
You can do what you've been told by Skurudo or use one of the multiples online sites to check open ports.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.
Or use nmap from another server.