skip to Main Content

how can i park a domain on CentOS based VPS without any Cpanel(cPanel,plesk or …) and using shh?

2

Answers


  1. You can edit httpd.conf and where it says the ServerName part under the virtual hosts section, you can add your domain there. If your DNS isnt pointing to your web server, you will need to do that too (this is one of the advantages of cpanel etc it does it for you but then at the same time, leaves you wondering what it did)

    Something like

    <VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /www/docs/dummy-host.example.com
        ServerName dummy-host.example.com
        ServerName test.com
        ErrorLog logs/dummy-host.example.com-error_log
        CustomLog logs/dummy-host.example.com-access_log common
    </VirtualHost>
    
    Login or Signup to reply.
  2. I assume you have DNS (ie. Godaddy’s, or you get one with your VPS).

    Edit you file /etc/httpd/conf/httpd.conf

    Add this at the bottom (use your domain name as ServerName and your folder as DocumentRoot):

    <VirtualHost *:80>
    ServerAdmin root@localhost
    DocumentRoot /home/examplecom/www/
    ServerAlias example.com
    ServerName www.example.com
    ErrorLog logs/www.example.com-error_log
    CustomLog logs/www.example.com-access_log common
        <Directory /home/examplecom/www/>
                Options FollowSymLinks
                AllowOverride All
        </Directory>
    </VirtualHost>
    

    Directory is optional, but this works for me.

    Than go to SSH as a “root” and reset Apache server:

    service httpd restart
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search