huzal12
huzal12

Reputation: 79

How do I make my new website public?

I have registered a new domain and set nameservers, A-records. I have also added conf files in my sites-enabled and sites-available directories under apache2 directory.

What would be the next step to lead incoming traffic to my appropriate site?

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName x.com
ServerAlias www.x.com

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Upvotes: 0

Views: 85

Answers (1)

You seem to be missing the document root entry in your virtual hosts file. That is your next step to redirect traffic to your site.

Place this under server alias

DocumentRoot /var/www/x.com/public_html

Then you put your website in the folder /var/www/x.com/public_html. Make sure you modify the access rights so anyone can view the public_html contents

Check out this link for further details.

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Upvotes: 1

Related Questions