Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> virtualhosts config issue?, new server box
jfullen
post Mar 16 2009, 01:30 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 16-March 09
Member No.: 14,188



This is my first forray into setting up virtual hosts. I am moving 4 sites from Lunarpages to a linode. I set up a basic html page as a place holder for each of the four sites. One of the sites I simply switched the domain servers to linodes'. One of the others I used the import zone feature from linodes domain manager. The other two I left alone for now. Ok so I initally set up Apache, punched the ip into the browser and got the "IT WORKS!". Great. I then set out to set up some virtual hosts to handle the multiple sites.
- I created directories for each of the sites in /var/www/public_html/domainname/public,private,log,etc...
- I created a basic html file for each site and placed it /var/www/public_html/domainname/public/index.html
- I edited the apache2.conf file and added the lines
Include /etc/apache2/sites-enabled/
ServerName 97.107.133.117
NameVirtualHost *:80
<IFModule mod_ssl.c>
NameVirtualHost *:443
</IFModule>
- I created a vhost file for each domain and placed them /etc/apache2/sites-available/domain1.com
the content of the file was:
# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come

# domain: domain1.com
# public: /home/var/www/public_html/domain1.com/

<VirtualHost *:80>

# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@domain1.com
ServerName 97.107.133.117
ServerAlias www.domain1.com


# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /home/var/www/public_html/domain1.com/public


# Custom log file locations
LogLevel warn
ErrorLog /home/var/www/public_html/domain1.com/log/error.log
CustomLog /home/var/www/public_html/domain1.com/log/access.log combined

</VirtualHost>

-I used the command sudo a2ensite domain1.com for each of the sites. I rebooted Apache after each.

The problem is: I point the browser at the IP 97.107.133.117 and the default html does not show. I am not sure if I set things up right. Any help or comments would be appreciated
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 12th December 2017 - 10:09 PM