Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress Get redirect to another vhost domain

Discussion in 'Blogs & CMS usage' started by rc112, Mar 10, 2018.

  1. rc112

    rc112 Member

    Sep 22, 2017
    Local Time:
    3:21 PM

    I create 2 wordpress site via option 22 and I can see 2 files for those 2 domains. But when I tried to enter domain2, I got redirected to domain1. I don't know what is going wrong. Look everywhere an tried. Any help? thank. @eva2000
  2. Jon Snow

    Jon Snow Active Member

    Jun 30, 2017
    Local Time:
    3:21 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I've never used the auto-wordpress installer, but did you check your vhost files to make sure they point to the correct paths or if something was missing?
  3. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    5:21 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    For each domain, when you create a new nginx vhost domain via centmin.sh menu option 2 or menu option 22 or via /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
    • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
    • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
    • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
    • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
    Please post the contents both domains vhost files and commands for /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags)

    what is output of these commands in ssh
    Code (Text):
    curl -I https://domain.com

    Code (Text):
    curl -I https://www.domain.com

    Code (Text):
    curl -I http://domain.com

    Code (Text):
    curl -I http://www.domain.com

    wrap output in CODE tags