Portal Home > Knowledgebase > Virtual Private Servers > Premium VPS > Prosper202 > How to Manually Configure Your Server with a Domain and Website on Prosper202


How to Manually Configure Your Server with a Domain and Website on Prosper202




How to Configure Your Server with a Domain and Website

1. Login to your server via SSH.

2. Change the following in /etc/named.conf file.

To edit the file: nano /etc/named.conf

Use the arrow keys to navigate to the correct line.

Edit the following lines to match below:

listen-on port 53 { any; };
allow-query { any; };
recursion no;


Add the following to the end of the file:

zone REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN IN {
type master;
file "/etc/named/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN.zone";
allow-transfer { any; };
};


Press Ctrl+x then y to approve changes then enter to save.

3. Create the following zone file. ( Note the dots at the end of domain names, they are important. )

To edit new file: /etc/named/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN.zone

$TTL 86400
@ IN SOA ns1.REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN. admin@REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN. (
16213730111747685 ;serial
21600 ;refresh after 6 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
86400 ) ;minimum TTL of 1 day
@ 3600 IN A REPLACE_THIS_TEXT_WITH_YOUR_IPADDRESS
ns1 86400 IN A REPLACE_THIS_TEXT_WITH_YOUR_IPADDRESS
ns2 86400 IN A REPLACE_THIS_TEXT_WITH_YOUR_IPADDRESS
www 86400 IN CNAME @
@ 86400 IN NS ns1.REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN.
@ 86400 IN NS ns2.REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN.

Press Ctrl+x then y to approve changes then enter to save.

4. Change owner of the zone file

chown root.named /etc/named/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN.zone

5. Reload name server control utility

rndc reload

Note: If you see -- rndc: neither /etc/rndc.conf nor /etc/rndc.key was found do the following:

rndc-confgen >> /etc/rndc.conf

6. Restart the named service

service named restart


HTTPD Setup.


7. Make the document root directory for the domain.

mkdir -p /var/www/html/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN/public_html

8. Allow access to the directory.

chmod 755 /var/www

9. Edit the /etc/httpd.conf file.

To edit the file: nano /etc/named.conf

Ctrl+W to find "Listen 80" and un-comment (#) if needed.
Ctrl+W to find "NameVirtualHost" then un-comment (#) and edit as below:

NameVirtualHost REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN:80


10. Append the following to the file.

<VirtualHost REPLACE_THIS_TEXT_WITH_YOUR_IPADDRESS:80>

ServerAdmin admin@REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN

DocumentRoot /var/www/html/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN/public_html

ServerName www.REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN

ServerAlias REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN

ErrorLog log/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN_error_log

CustomLog log/REPLACE_THIS_TEXT_WITH_YOUR_DOMAIN_requests_log common

</VirtualHost>

11. Now restart the service.

service httpd restart

If service will not restart check logs. Make sure log paths exist.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read