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 General Discussion
  • Search

Redirects from ports automatically

General questions about VestaCP
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
alifopensrc
Posts: 21
Joined: Sun Nov 09, 2014 12:20 pm

Redirects from ports automatically
  • Quote

Post by alifopensrc » Sun Dec 14, 2014 10:57 am

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

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Redirects from ports automatically
  • Quote

Post by joem » Sun Dec 14, 2014 9:34 pm

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
under

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;
 
add

Code: Select all

 error_page      497     https://$host:8083$request_uri;

Code: Select all

service vesta restart
Top

aclase
Posts: 21
Joined: Mon Oct 27, 2014 11:42 pm

Re: Redirects from ports automatically
  • Quote

Post by aclase » Mon Jan 25, 2016 7:49 pm

Could it be added to standart installer?
Top

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

Re: Redirects from ports automatically
  • Quote

Post by skurudo » Tue Jan 26, 2016 8:22 am

aclase wrote:Could it be added to standart installer?
How do you see this feature?
Users don't really know for sure, witch domain will be in use.
Top

aclase
Posts: 21
Joined: Mon Oct 27, 2014 11:42 pm

Re: Redirects from ports automatically
  • Quote

Post by aclase » Mon Aug 08, 2016 6:59 am

skurudo wrote:
aclase wrote:Could it be added to standart installer?
How do you see this feature?
Users don't really know for sure, witch domain will be in use.
Users no, they can use own domains, what will be redirected to admin's targeted domain with ssl and certificate
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Redirects from ports automatically
  • Quote

Post by mehargags » Mon Aug 08, 2016 6:00 pm

XoXiLhJ0mn 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.
Exactly... it would be a disaster for security
Top

sacredwebsite
Posts: 29
Joined: Sun Dec 13, 2015 6:18 pm

Re: Redirects from ports automatically
  • Quote

Post by sacredwebsite » Thu Sep 08, 2016 3:28 pm

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


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “General Discussion”



  • 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