|
||
|
|||||||
| Starbucks @ RunUO.com Unmoderated forum for off-topic banter, screen shots, chit-chat and things of this nature. Flames are permitted, and you can pretty much do nearly anything within reason. No advertisements. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
Greetings!
Since you guys are the most technically proficient people I "know"...I was wondering if some of you could help me with Apache 2's vhosting features. I have four websites that I want to map to four folders in my htdocs folder. I'm running WinXP. (yes a webserver not on Linux...sue me) Anyhow, after reading Apache's notes on how to do this, SAMS's notes on how to do this, and trying every configuration I can imagine...it doesn't work. Yarr. Sooo...I've been trying to get this to work for about a year now, and it never has. If one of you guys has Apache2 and knows what the heck I'm talking about, and knows how to make it work, I'd really appreciate some example code and some explanation. Thanks a lot! TMS
__________________
Goodbye, folks. |
|
|
|
|
#3 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
Documentation on the topic can be found at:
http://httpd.apache.org/docs-2.0/vhosts/ Documentation on the specific type of vhost I am trying to implement (name-based) is at: http://httpd.apache.org/docs-2.0/vhosts/name-based.html
__________________
Goodbye, folks. |
|
|
|
|
#5 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
I will post the relevant parts... (sans identifiable info)
# Use name-based virtual hosting. # #NameVirtualHost *:80 NameVirtualHost *:80 # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost *:80> <VirtualHost *:80> ServerAdmin admin@site1.com DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/folder1" DirectoryIndex index.html ServerName site1.com ErrorLog logs/site1.com-error_log </VirtualHost> <VirtualHost *:80> ServerAdmin admin@site2.net DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/folder2" DirectoryIndex index.php index.html index.htm ServerName site2.net ErrorLog logs/site2.net-error_log </VirtualHost> <VirtualHost *:80> ServerAdmin admin@site3.net DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/folder3" DirectoryIndex index.html ServerName site3.net ErrorLog logs/site3.net-error_log </VirtualHost> <VirtualHost *:80> ServerAdmin admin@site4.com DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/folder4" DirectoryIndex index.php ServerName site4.com ErrorLog logs/site4.com-error_log </VirtualHost> UseCanonicalName is off currently. DocumentRoot overall is "htdocs" It doesn't give me any errors...it just doesn't work.
__________________
Goodbye, folks. |
|
|
|
|
#8 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
I was trying to avoid that for the no-ad policy.
The links would be: www.tmstksbk.com www.tmproductions.net www.csquarenet.net The last one is semi-personal...so let's not mess with it yet...please. And now I'm embarassed...cause the links all point to an ancient site I did...two-three years ago. Fixed that. Points to a newer site-in-progress. So now it's giving me a warning! Hey...it started doing SOMETHING. "[warn] _default_ VirtualHost overlap on port 80, the first has precedence" (from the error.log file) Fixes?
__________________
Goodbye, folks. |
|
|
|
|
#9 (permalink) |
|
Account Terminated
|
Are they all suppose to be the same website?
Because all those links work, but they are all the same website. tells me you might have the same files in all the files. Clearly asking for help, and posting links to your website, is within the rules if its in starbucks since its not RunUO connected. |
|
|
|
|
#10 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
They're not supposed to be the same website...that's the problem. The folders do not have the same files inside, nor even the same file types (some php, some html).
If they were all supposed to be the same website, this would be buttloads easier...just map them all to the same IP in the domainpanel.
__________________
Goodbye, folks. |
|
|
|
|
#11 (permalink) | ||
|
Account Terminated
|
Quote:
Quote:
|
||
|
|
|
|
#12 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,424
|
<VirtualHost *:80>
ServerAdmin admin@csquarenet.net DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/" DirectoryIndex index.php index.html index.htm ServerName csquarenet.net ErrorLog logs/csquarenet.net-error_log </VirtualHost> <VirtualHost *:80> ServerAdmin admin@tmstksbk.com DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/sdg" DirectoryIndex index.html ServerName tmstksbk.com ErrorLog logs/tmstksbk.com-error_log </VirtualHost> <VirtualHost *:80> ServerAdmin admin@tmproductions.net DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/tmproductions" DirectoryIndex index.html ServerName tmproductions.net ErrorLog logs/tmproductions.net-error_log </VirtualHost>
__________________
Goodbye, folks. |
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|