redirect to subdomain without configuration issue

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

  1. Zaman

    Zaman New Member

    Hello,
    i was try to change in domain (example.com) and sub-domain (wp.example.com)
    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
    now:
    I try to start from begin so
    I removed the domain name (example.com) that changed from sub-domain (wp.example.com) now there is no (example.com & wp.example.com)
    and create domain name like the old (example.com)
    the issue when access to example.com its redirect to wp.example.com with https
    even when i remove it (example.com) again still the same .
    and show
    Forbidden
    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 wp.shrofee.com 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
    note:
    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/ .
    so
    why still redirect ???
    Thanks
     
  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

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

    Zaman New Member

    Hello,
    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 shrofee.com. 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
    note:
    for ssl using letsencrypt
    Best Regards
     

Share This Page