Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set up virtual domains?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello, i am useing Linux Redhat 7.2 running apache
i'm a newbie an i need help on how to make virtual host/domain an to make them point at my computer
i need some direction
if anyone could help would be appreciated
 
also, i need to know how to open the http ports, i forgot an left them closed thru outside connection on my local network could someone tell me how to open them?
thanks in advance
 
Hi,
For your question two on redhat

1)at root prompt>setup
2)select firewall
3)then simply select which ports you want open using the customise button. Use spacebar on keyboard to select and tab to move through eth0,http,smtp,dns etc.

Good luck


 
To get a domain name to point at your computer, you need to edit the dns "A" record for that domain and enter the ip address of your computer. You can have as many domains and sub-domains point to the same ip as you want. The host more than one domain on your server, you will need to use "name based virtual hosting". This means You will NOT use the main server configuration. You will create a vhost container for each vhost using the main server as an example. Here is a very short section of what the vhost section will look like in httpd.conf:

UseCanonicalName Off

NameVirtualHost *

<VirtualHost *>
ServerAdmin webmaster@domain1.com
DocumentRoot /var/ ServerName domain1.com
ErrorLog /var/ CustomLog /var/ common

<Directory &quot;/var/
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

</Directory>

ScriptAlias /cgi-bin/ &quot;/var/
<Directory &quot;/var/ AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

This is just one vhost container. All of them will start with <VirtualHost*> and end with </VirtualHost>. You can copy and paste as many as you need then change all the information inside to match your setup. I would put this at the bottom of your httpd.conf so it is easier to edit in the future. This should give you a good start on setting up your server. Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top