| Author |
Message |
markoso
Joined: 09 Jan 2012
Posts: 2
|
| Posted: Mon Jan 09, 2012 12:36 pm Post subject: Can't setup a basic site on Ubuntu 10.04(LTS) |
|
|
I am trying to setup a site where i can simply test it by getting it up and running with no contest at all but i am getting Unable to connect: from Firefox.
I have Linode on Ubuntu 10.04(LTS) setup, booted and running fine. After logging to Putty i managed to setup my hostname and FQDN by commands
echo "plato" > /etc/hostname
hostname -F /etc/hostname
127.0.0.1 localhost.localdomain localhost
12.34.56.78 plato.example.com plato
I replaced plato with the name of my host and i replaced example.com with the name of domain added in dns manager as my domain zone
After this i moved on to
Set up a LAMP Server on Ubuntu 10.04 (Lucid) guide and followed instructions from there
After typing 2 test commands it seems hostname and fqdn are set properly
I created /etc/apache2/sites-available/example.com and edited it to reflect the domain(Site) i am trying to enable, according to the details provided
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /srv/www/example.com/public_html/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
</VirtualHost>
After that i followed the rest of the guide and tried to launch my site in Firefox(Firefox can't establish a connection to the server at....)
I also tried to create empty index.html in /srv/www/example.com/public_html/ dir that i created during the guide... Still cant connect.
Also after testing DNS servers with http://www.dnswatch.info/ my site normally returns all 5 name servers that i added in my domain provider cpanel yesterday.
So i really have no idea what am i doing wrong here? |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 1058
|
| Posted: Mon Jan 09, 2012 1:25 pm Post subject: |
|
|
1. Is Apache running?
Code: /etc/init.d/apache2 restart
(While you're at it, also make sure to enable the newly created site using the a2ensite command.)
2. Did you add A records in your DNS, pointing both your domain and the "www" subdomain to your Linode's IP address? |
|
| Back to top |
|
markoso
Joined: 09 Jan 2012
Posts: 2
|
| Posted: Mon Jan 09, 2012 1:50 pm Post subject: |
|
|
thank you!
/etc/init.d/apache2 restart did the trick.
At first i realized i made error while setting up data in <virtualhost> but after i corrected it, it still didnt work ...
i just repeated lamp tutorial and since it only mentioned /etc/init.d/apache2 RELOAD that didnt fix it.
But after trying with RESTART everything seems to function perfect, thanks again |
|
| Back to top |
|
| |