Welcome to Centmin Mod Community
Register Now

How to change default nginx page.

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by HarryPotter, Apr 4, 2015.

Tags:
  1. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:50 AM
    Hi. Sorry. Im just added new vhosts. But when i viewing my site it return default nginx page.

    Of course I have put path to documents:
    root html/domain.com/public;

    But when manual open url: domain.com/domain.com/public it return fine :3
     
  2. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:50 AM
    Nginx 1.13.x
    MariaDB 5.5
    Please read and following the Getting Started guide particularly step 1 and 2 and see at bottom of centminmod.com/getstarted.html, the relationship between main hostname nginx vhost and individual nginx vhosts you created via centmin.sh menu option 2
     
  3. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:50 AM
    It not work for me. Im just manual create the file. domain.com.conf and it work :/
     
  4. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:50 AM
    Nginx 1.13.x
    MariaDB 5.5
    did you use centmin.sh menu option 2 the first time to create domain.com.conf ?

    what does output of command look like
    Code:
    ls -lahrt /usr/local/nginx/conf/conf.d/
     
  5. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    2:50 AM
    I have used but it not work. So Im just do it. sudo nano /usr.../conf.d/domain.com.conf

    And work fine :D
     
  6. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:50 AM
    Nginx 1.13.x
    MariaDB 5.5
    there's your problem then, only proper way for Centmin Mod to create site accounts and Nginx vhost is via centmin.sh menu option 2 as outlined at step 2 in Getting Started guide and here Nginx Vhost & NSD DNS Setup - Centmin Mod - Menu based Nginx installer for CentOS servers As the menu creates not just the nginx vhost file but all associated directories for the domain. Seems what you did was manually create the nginx vhost file without the associated directories.

    Make sure you run centmin.sh as root user and not sudo user etc. As centmin.sh may fail to properly work without full root user access.

    what does contents of your /usr/local/nginx/conf/conf.d/domain.com.conf looki like ? post wrap it around CODE tags for easier viewing