Apache Virtualhost Question
Posted: Thu Oct 12, 2006 2:52 pm
I have a conf file on an old server that was serving webpages. We are moving the pages to PHP from static HTML on a Linux server. The problem is we still have years of database data that is built from old IBM code.
I have ways to grab data from the server internally which is no problem. The problem is the CONF file has multiple entries for different hosts. Here is a trimmed down version with lots of Directory and Location stuff missing.
Now I must grab the file with PHP using the internal network: 192.x.x.x (from myaddress1.com) which is fine for the first entry. If I need to do it to an alternate entry (ex. myaddress2.com) from the same internal IP, it breaks because it doesn't use a server alias and seems to direct to the first entry.
My theories (having never setup any multiple apache server) is that I thought about having a blank server alias as the first entry so if I called 192.x.x.x it would default to there, but it wouldn't be able to be seen by any external users. What about using the actual number as the server alias?
Any help here, or places I should look for more information regarding this?
Sorry if I didn't fully explain myself here, I will add more information if it's needed.
I have ways to grab data from the server internally which is no problem. The problem is the CONF file has multiple entries for different hosts. Here is a trimmed down version with lots of Directory and Location stuff missing.
Code: Select all
<VirtualHost x.x.x.x:80>
ServerName www.myaddress1.com
ServerAlias myaddress1.com
DocumentRoot /host1/
ErrorLog logs/host1
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" extended
LogFormat "%{Referer}i -> %U" referer
LogFormat %{User-agent}i agent
<Directory />
Order Allow,Deny
Deny From all
UserID %%SERVER%%
</Directory>
</VirtualHost>My theories (having never setup any multiple apache server) is that I thought about having a blank server alias as the first entry so if I called 192.x.x.x it would default to there, but it wouldn't be able to be seen by any external users. What about using the actual number as the server alias?
Any help here, or places I should look for more information regarding this?
Sorry if I didn't fully explain myself here, I will add more information if it's needed.