We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Redirects from ports automatically
-
- Posts: 21
- Joined: Sun Nov 09, 2014 12:20 pm
Redirects from ports automatically
Hi,
1. How do i redirect the port 8083 to the hostname:8083?
2. Is there like a redirect module for Vesta where we can set redirects?
Thank you.
-AOS.
1. How do i redirect the port 8083 to the hostname:8083?
2. Is there like a redirect module for Vesta where we can set redirects?
Thank you.
-AOS.
Re: Redirects from ports automatically
alifopensrc wrote:Hi,
1. How do i redirect the port 8083 to the hostname:8083?
2. Is there like a redirect module for Vesta where we can set redirects?
Thank you.
-AOS.
Code: Select all
nano /usr/local/vesta/nginx/conf/nginx.conf
Code: Select all
# Vhost
server {
listen 8083;
server_name _;
root /usr/local/vesta/web;
charset utf-8;
ssl on;
ssl_certificate /usr/local/vesta/ssl/certificate.crt;
ssl_certificate_key /usr/local/vesta/ssl/certificate.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 404 /error/404/index.html;
error_page 403 /error/index.html;
error_page 500 /error/index.html;
Code: Select all
error_page 497 https://$host:8083$request_uri;
Code: Select all
service vesta restart
Re: Redirects from ports automatically
Could it be added to standart installer?
Re: Redirects from ports automatically
How do you see this feature?aclase wrote:Could it be added to standart installer?
Users don't really know for sure, witch domain will be in use.
Re: Redirects from ports automatically
Users no, they can use own domains, what will be redirected to admin's targeted domain with ssl and certificateskurudo wrote:How do you see this feature?aclase wrote:Could it be added to standart installer?
Users don't really know for sure, witch domain will be in use.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Redirects from ports automatically
Exactly... it would be a disaster for securityXoXiLhJ0mn wrote:Further, a global redirect for all users could be problematic because each user should have their own certificate, unless you wanna have a default certificate issued.
-
- Posts: 29
- Joined: Sun Dec 13, 2015 6:18 pm
Re: Redirects from ports automatically
I think the original poster is trying to achieve something similar to what I am attempting to.
When a client sets up their domains in the hosting panel, I want them to be able to just add :8083 to their domain, to then be redirected to the servers hostname:8083, this way they do not have to get the SSL error due to the panel having the certificate issued to the hostname and not client's domain name. This prevents from having to append the certificate for the vesta panel with each of the clients domains in order to prevent this.
This is not possible via any redirect directive due to SSL connection happening before any redirect occurs.
Only way I can see this happening is by setting up an alias directive that points to vesta's web root, similar to how roundcube and phpmyadmin are set up as they allow for an encrypted connection and verify off the domains certificate.
When a client sets up their domains in the hosting panel, I want them to be able to just add :8083 to their domain, to then be redirected to the servers hostname:8083, this way they do not have to get the SSL error due to the panel having the certificate issued to the hostname and not client's domain name. This prevents from having to append the certificate for the vesta panel with each of the clients domains in order to prevent this.
This is not possible via any redirect directive due to SSL connection happening before any redirect occurs.
Only way I can see this happening is by setting up an alias directive that points to vesta's web root, similar to how roundcube and phpmyadmin are set up as they allow for an encrypted connection and verify off the domains certificate.