You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by li...@kentane.net on 2002/12/13 11:34:10 UTC

[users@httpd] Virtual host problems

Greetings,
I have been battling with virtual hosts. My setup is as follows:
apache-1.3.27-2 RH Linux 7.3

The system has one IP address 192.168.1.2. My virtual hosts stuff on the
http.conf file follows: NameVirtualHost 192.168.1.2

<VirtualHost 192.168.1.2>
ServerName webmail.domain.tld
ServerPath /webmail
DocumentRoot /var/www/html/webmail
</VirtualHost>
    
NameVirtualHost 192.168.1.2

<VirtualHost 192.168.1.2>
ServerName web-cyradm.domain.tld
ServerPath /web-cyradm/
DocumentRoot /var/www/html/web-cyradm
</VirtualHost>

When I try and access either virtual hosts by hostname, I get the
default page.

Is it possible to do this with only one IP addresss or do I need to add
another IP to the webserver to achieve this?

I can't seem to get it going. Please help!


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host problems

Posted by Erwien Samantha Y <ap...@cosinus.sederhana.or.id>.
Just take a look this example,

http://httpd.apache.org/docs/vhosts/examples.html

On Fri, 2002-12-13 at 10:34, lists@kentane.net wrote:
> Greetings,
> I have been battling with virtual hosts. My setup is as follows:
> apache-1.3.27-2 RH Linux 7.3
> 
> The system has one IP address 192.168.1.2. My virtual hosts stuff on the
> http.conf file follows: NameVirtualHost 192.168.1.2
> 
> <VirtualHost 192.168.1.2>
> ServerName webmail.domain.tld
> ServerPath /webmail
> DocumentRoot /var/www/html/webmail
> </VirtualHost>
>     
> NameVirtualHost 192.168.1.2
> 
> <VirtualHost 192.168.1.2>
> ServerName web-cyradm.domain.tld
> ServerPath /web-cyradm/
> DocumentRoot /var/www/html/web-cyradm
> </VirtualHost>
> 
> When I try and access either virtual hosts by hostname, I get the
> default page.
> 
> Is it possible to do this with only one IP addresss or do I need to add
> another IP to the webserver to achieve this?
> 
> I can't seem to get it going. Please help!
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
-- 
Erwien Samantha Y <ap...@cosinus.sederhana.or.id>
Sederhana, TPG


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Need HELP getting started with EashPHP

Posted by "J. Greenlees" <ja...@shaw.ca>.

tmb wrote:
> Just loaded EassPHP on a Windows 98se PC.
> 
> It tells me Apache & MySQL are running...
> 
> I need to launch MySQL to create a db...
> 
> (Doing this to take over the hollidays on my laptop
> and learn Apache, MySQL & PHP... and to create a
> prototype db...)
> 
> Know how to launch MySQL from linux command line...
> 
> Don't know how to launch MySQL from the Windows box...
> 
> Need it to run on local machine & not over network or
> net.
> 
> If some one would offer to hold my hand for a few
> start up questions I should be able to mostly take it
> from there.
> 
two ways to do it.
1) install phpmyadmin and use that. ( works great for db administration )
2) cd to the mysql dir ( normally on win boxes c:\mysql\bin\ )
mysqld
mysql
and you have the command prompt interface for it.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Need HELP getting started with EashPHP

Posted by tmb <to...@yahoo.com>.
Just loaded EassPHP on a Windows 98se PC.

It tells me Apache & MySQL are running...

I need to launch MySQL to create a db...

(Doing this to take over the hollidays on my laptop
and learn Apache, MySQL & PHP... and to create a
prototype db...)

Know how to launch MySQL from linux command line...

Don't know how to launch MySQL from the Windows box...

Need it to run on local machine & not over network or
net.

If some one would offer to hold my hand for a few
start up questions I should be able to mostly take it
from there.

Thanks for any help.

tmb


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .PHP vs .PHP3 ? What's the difference?

Posted by stephane <st...@parenton.com>.
As far as i can remember, the php3 was the php version3.x.x standard
extension.... but since php is still evolving, the php guys thought (and i
guess they were right), that it would be hell to maintain sites with .php3,
.php4, .php5 etc.

so It's more simple to deal only with .php files, that is mainly php4
extension, but that also should be a "standard" extension...

HTH
Stephane
----- Original Message -----
From: "tmb" <to...@yahoo.com>
To: <us...@httpd.apache.org>
Sent: Friday, December 13, 2002 2:21 PM
Subject: [users@httpd] .PHP vs .PHP3 ? What's the difference?


> What is the difference between PHP files that end in
> .PHP vs .PHP# ??
>
> www.phpMyAdmin.net offers downloads of their program
> for each type and I don't know the difference...
>
> Thanks for any help.
>
> tmb
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] .PHP vs .PHP3 ? What's the difference?

Posted by tmb <to...@yahoo.com>.
What is the difference between PHP files that end in
.PHP vs .PHP# ??

www.phpMyAdmin.net offers downloads of their program
for each type and I don't know the difference...

Thanks for any help.

tmb




__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host problems

Posted by Renato Salles <ma...@brturbo.com>.
Em Sex 13 Dez 2002 09:13, lists@kentane.net escreveu:
Sugestion:

1- Disable (comment) the "default" VirtualHost applied at httpd.conf.
2- Empty its folder, or rename it and mk a new with the same name.
3- Make sure this new folder ( ex.: /var/www) are EMPTY. Preserve the old 
permissions, (root.www and 775, in my case).
4- As root, type: /usr/sbin/apachectl configtest,
    and watch if any warning/error is echoed
5- Reload yor httpd service
6- Open a term as root, and watch your log,:
tail -f /var/log/httpd/access_log (or where your access_log is)
7- Watch  the log when you open via browser your VirtualHost, by the name, or 
by the ip.
8- If it only opens when you call the ip, your problem is dns. If nothing 
happens, and you get some 4xx error at the log, the problem is your 
(miss)config.



> Hi.
> Stupid question,
> Can you suggest a painless, less error prone way for me to change the
> main standalone server to a virt host?
>
> -----Original Message-----
> From: Zac Stevens [mailto:zts@cryptocracy.com]
> Sent: 13 December 2002 13:09 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Virtual host problems
>
> On Fri, Dec 13, 2002 at 12:58:07PM +0200, lists@kentane.net wrote:
> > The testing I tried was with a web browser. The default page I am
> > talking about is the one of the main apache config. I get the page
> > entitled "Test Page for the Apache Web Server on Red Hat Linux"
>
> Ahh okay.  You'll probably find life easier if you configure all of the
> sites as VirtualHosts.  Many strange problems can be found when mixing
> VirtualHosts with standalone config.
>
> If you'd like to test the theory out, try changing the VirtualHosts to
> be on a different port to the main server.  If they work fine then, you
> can be satisfied that changing your main server into a virtualhost will
> fix the problem.
>
> > The hostname is not a DNS registered name yet. I have put the name in
> > my hosts file. I even tried putting it in the hosts file of the apache
> >
> > server as well, that did not help.
>
> Putting it into the hosts file on your PC should be enough to test.
> Adding it to the server can make life simpler, and is required if you
> are using hostsnames in places where Apache requires an IP address.
>
>
> Zac
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
---

Fui!

====================<<<<<< * >>>>>>>====================
===========  Renato Q. Salles UIN 143517540  ===========
===========  Linux Registered User nÂș 217696 ===========
====================<<<<<< * >>>>>>>====================



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Virtual host problems

Posted by li...@kentane.net.
Hi.
Stupid question,
Can you suggest a painless, less error prone way for me to change the
main standalone server to a virt host?

-----Original Message-----
From: Zac Stevens [mailto:zts@cryptocracy.com] 
Sent: 13 December 2002 13:09 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Virtual host problems


On Fri, Dec 13, 2002 at 12:58:07PM +0200, lists@kentane.net wrote:
> The testing I tried was with a web browser. The default page I am 
> talking about is the one of the main apache config. I get the page 
> entitled "Test Page for the Apache Web Server on Red Hat Linux"

Ahh okay.  You'll probably find life easier if you configure all of the
sites as VirtualHosts.  Many strange problems can be found when mixing
VirtualHosts with standalone config.

If you'd like to test the theory out, try changing the VirtualHosts to
be on a different port to the main server.  If they work fine then, you
can be satisfied that changing your main server into a virtualhost will
fix the problem.

> The hostname is not a DNS registered name yet. I have put the name in 
> my hosts file. I even tried putting it in the hosts file of the apache

> server as well, that did not help.

Putting it into the hosts file on your PC should be enough to test.
Adding it to the server can make life simpler, and is required if you
are using hostsnames in places where Apache requires an IP address.  


Zac


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host problems

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Fri, Dec 13, 2002 at 12:58:07PM +0200, lists@kentane.net wrote:
> The testing I tried was with a web browser. The default page I am
> talking about is the one of the main apache config. I get the page
> entitled "Test Page for the Apache Web Server on Red Hat Linux"

Ahh okay.  You'll probably find life easier if you configure all of the
sites as VirtualHosts.  Many strange problems can be found when mixing
VirtualHosts with standalone config.

If you'd like to test the theory out, try changing the VirtualHosts to be
on a different port to the main server.  If they work fine then, you can be
satisfied that changing your main server into a virtualhost will fix the
problem.

> The hostname is not a DNS registered name yet. I have put the name in my
> hosts file. I even tried putting it in the hosts file of the apache
> server as well, that did not help.

Putting it into the hosts file on your PC should be enough to test.  Adding
it to the server can make life simpler, and is required if you are using
hostsnames in places where Apache requires an IP address.  


Zac


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Virtual host problems

Posted by li...@kentane.net.
Hi Zac,
The testing I tried was with a web browser. The default page I am
talking about is the one of the main apache config. I get the page
entitled "Test Page for the Apache Web Server on Red Hat Linux"

The hostname is not a DNS registered name yet. I have put the name in my
hosts file. I even tried putting it in the hosts file of the apache
server as well, that did not help.

I have looked at the example at:
http://httpd.apache.org/docs/vhosts/examples.html. This is what I used
as the guideline.

No luck.

-----Original Message-----
From: Zac Stevens [mailto:zts@cryptocracy.com] 
Sent: 13 December 2002 12:51 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Virtual host problems


Hi there,

On Fri, Dec 13, 2002 at 12:34:10PM +0200, lists@kentane.net wrote:
> When I try and access either virtual hosts by hostname, I get the 
> default page.
> 
> Is it possible to do this with only one IP addresss or do I need to 
> add another IP to the webserver to achieve this?

The whole point of name-based virtualhosts is that you only need a
single IP address, so rest assured you're on the right track!  I'm
wondering how you have tried testing - with a web browser, or via some
other method?

Also, when you say you get the 'default page', is that page the first
virtualhost in your config?


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host problems

Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi there,

On Fri, Dec 13, 2002 at 12:34:10PM +0200, lists@kentane.net wrote:
> When I try and access either virtual hosts by hostname, I get the
> default page.
> 
> Is it possible to do this with only one IP addresss or do I need to add
> another IP to the webserver to achieve this?

The whole point of name-based virtualhosts is that you only need a single
IP address, so rest assured you're on the right track!  I'm wondering how
you have tried testing - with a web browser, or via some other method?

Also, when you say you get the 'default page', is that page the first
virtualhost in your config?


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host problems

Posted by Erwien Samantha Y <ap...@cosinus.sederhana.or.id>.
what do u want to use with ServerPath ,

what about simple vhost with one IP,

NameVirtualHost 192.168.1.2

<VirtualHost 192.168.1.2>
ServerName webmail.domain.tld
DocumentRoot /var/www/html/webmail
</VirtualHost>

<VirtualHost 192.168.1.2>
ServerName web-cyradm.domain.tld
DocumentRoot /var/www/html/web-cyradm
</VirtualHost>


good luck !




On Fri, 2002-12-13 at 10:34, lists@kentane.net wrote:
> Greetings,
> I have been battling with virtual hosts. My setup is as follows:
> apache-1.3.27-2 RH Linux 7.3
> 
> The system has one IP address 192.168.1.2. My virtual hosts stuff on the
> http.conf file follows: NameVirtualHost 192.168.1.2
> 
> <VirtualHost 192.168.1.2>
> ServerName webmail.domain.tld
> ServerPath /webmail
> DocumentRoot /var/www/html/webmail
> </VirtualHost>
>     
> NameVirtualHost 192.168.1.2
> 
> <VirtualHost 192.168.1.2>
> ServerName web-cyradm.domain.tld
> ServerPath /web-cyradm/
> DocumentRoot /var/www/html/web-cyradm
> </VirtualHost>
> 
> When I try and access either virtual hosts by hostname, I get the
> default page.
> 
> Is it possible to do this with only one IP addresss or do I need to add
> another IP to the webserver to achieve this?
> 
> I can't seem to get it going. Please help!
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
-- 
Erwien Samantha Y <ap...@cosinus.sederhana.or.id>
Sederhana, TPG


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org