Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx [Solved] Problem adding .me vhost on beta branch

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Shmee, Sep 23, 2016.

  1. Shmee

    Shmee New Member

    12
    2
    3
    Aug 27, 2014
    Space
    Ratings:
    +2
    Local Time:
    10:21 AM
    Something goes wrong and normal http DOES NOT work when adding a .me vhost

    [​IMG]

    If I go to https self signed it DOES work and I get the normal

    Code:
    Welcome to domain.me. This index.html page can be removed.
    
    Useful Centmin Mod info and links to bookmark.
    Fresh beta branch install.

    My normal .com vhost work fine. The problem seems to be just the normal http conf
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,987
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,767
    Local Time:
    10:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    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 of /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)
     
  3. Shmee

    Shmee New Member

    12
    2
    3
    Aug 27, 2014
    Space
    Ratings:
    +2
    Local Time:
    10:21 AM
    resolved
     
    Last edited: Sep 23, 2016
  4. Shmee

    Shmee New Member

    12
    2
    3
    Aug 27, 2014
    Space
    Ratings:
    +2
    Local Time:
    10:21 AM
    I just noticed [] works, but without www i get Centmin Mod Nginx Test Page

    edit: I'm wondering if this is a dns issue.
     
    Last edited: Sep 23, 2016
  5. eva2000

    eva2000 Administrator Staff Member

    28,987
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,767
    Local Time:
    10:21 AM
    Nginx 1.13.x
    MariaDB 5.5
  6. Shmee

    Shmee New Member

    12
    2
    3
    Aug 27, 2014
    Space
    Ratings:
    +2
    Local Time:
    10:21 AM
    That did it. I change virtual.conf to server.domain.me and now it's working just fine.

    Thank you for the help!
     
    • Like Like x 1
  7. eva2000

    eva2000 Administrator Staff Member

    28,987
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,767
    Local Time:
    10:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah i should update centmin mod to prevent users adding a new nginx vhost with a domain that matches server_name in virtual.conf to prevent this :)
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    28,987
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,767
    Local Time:
    10:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    Updated Centmin Mod 123.09beta01 nginx vhost generator to check for main hostname domain in 123.09beta01

    prevent folks from accidentally creating a new nginx vhost that matches the main server hostname domain name vhost Nginx - [Solved] Problem adding .me vhost on beta branch | Centmin Mod Community

    example

    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2/5.5 & 10.x Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 2
    --------------------------------------------------------
    

    Code (Text):
    ---------------------------------------------------------------
    Important Information
    ---------------------------------------------------------------
    
    You are about to create an Nginx vhost site account with/without
    HTTPS/SSL support. Details of this process are outlined on site
    at centminmod.com/nginx_domain_dns_setup.html. Also read the
    continually updated Getting Started Guide for Centmin Mod usage
    at centminmod.com/getstarted.html which covers the pure-ftpd
    ftp username that is auto generated with the Nginx vhost site.
    
    Do you want to continue with Nginx vhost site creation ? [y/n] y
    
    Enter vhost domain name to add (without www. prefix): centos7.localdomain
    

    Code (Text):
     Error: centos7.localdomain is already setup for server main hostname
     at /usr/local/nginx/conf/conf.d/virtual.conf
     It is important that main server hostname be setup correctly
    
     As per Getting Started Guide Step 1 centminmod.com/getstarted.html
     The server main hostname needs to be unique. So please setup
     the main server name vhost properly first as per Step 1 of guide.
    
     Aborting nginx vhost creation...
     
    • Like Like x 1