redirect to subdomain without configuration issue

Discussion in 'General' started by Zaman, Jan 5, 2018.

  1. Zaman

    Zaman New Member

    i was try to change in domain ( and sub-domain (
    so i remove the domain and change the sub-domain to the removed domain
    after that the website stop even with :8080
    i figured it with something in .vhost location
    location / {
    try_files $uri $uri/ /index.php?$args;
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;

    so it work after use .vhost of other website to access to :8080
    I try to start from begin so
    I removed the domain name ( that changed from sub-domain ( now there is no ( &
    and create domain name like the old (
    the issue when access to its redirect to with https
    even when i remove it ( again still the same .
    and show
    You don't have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    Apache/2.4.18 (Ubuntu) Server at Port 443
    so where is the problem when even the site is disabled from apache ???
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Are you using an apache or a Nginx web server? The code you posted above is for nginx and at the end, you post a message from apache. when you are using an Apache web server, then you can not use nginx directives and you have to remove them from apache directives field as they are not compatible with an apache server. apache uses a .htaccess file in WordPress instead.

    Besides that, ensure that you changed the URL's in WordPress as well, as WP will redirect you to the old URL otherwise.
    Zaman likes this.
  3. Zaman

    Zaman New Member

    Look like I'm using apache2 and was Nginx stop working
    after stop apache2 and Nginx was stopped too, it's still redirect from domain to sub-domain
    1- the websites is removed from ispconfig control panel.
    2- there is no files in web/ of domain name .
    3- check domain and sub-domain there is no files for them in sites-enabled/ .
    why still redirect ???
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I don't think your website can work if both are stop Anyway, I'd suggest you choose which one to use while disabling and purging the other one, totally. DO backup. Only then, can you determine on how to fix your redirect problem.
  5. Zaman

    Zaman New Member

    i check that i found nginx (nginx -v)
    is not installed
    so where is the wrong it's redirect even when apache2 is disabled
  6. Zaman

    Zaman New Member

    I try to remove websites and subdomains from sites-enable and sites-available and disable them from ispconfig cp but still looklike there is no effect on sites and still worked. so what to do ???
    but just redirect to https and show
    Secure Connection Failed
    An error occurred during a connection to SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
    when apache running

    and when stop it show
    Unable to connect
    with redirect to https
    and there is no htaccess or robot
    and look like there is effect on domain in vhost when make change from ispconfig cp
    for ssl using letsencrypt
    Best Regards

Share This Page