Re: [SLUG] Virtual hosts and PHP4 safe_mode

2004-09-05 Thread Matthew Palmer
On Sun, Sep 05, 2004 at 03:57:32PM +1000, Matthew Davidson wrote:
 Just wondering if anybody on the list uses PHP's safe_mode directive. 
 It seems to be the only viable solution to keeping people's noses out of 
 each other's business in a virtual host environment, but it seems like 
 it might break a lot of commonly-used scripts.
 
 Any good or bad experiences?

You've pretty much covered my experience with it.  I liken it to chroots --
useful when they work, but it means you have to be more careful and do more
fiddling around to make things work, and there are ways out of them in
certain circumstances.

- Matt


signature.asc
Description: Digital signature
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

[SLUG] Virtual hosts and PHP4 safe_mode

2004-09-04 Thread Matthew Davidson
Hi,
Just wondering if anybody on the list uses PHP's safe_mode directive. 
It seems to be the only viable solution to keeping people's noses out of 
each other's business in a virtual host environment, but it seems like 
it might break a lot of commonly-used scripts.

Any good or bad experiences?
Matthew.
--
0419 242 316 ... (02) 6658 1607
--
Please avoid sending me Word or PowerPoint attachments.
(Save as HTML or RTF)
See http://www.fsf.org/philosophy/no-word-attachments.html
--
Our enemies are innovative and resourceful, and so are we.
They never stop thinking about new ways to harm our people
and our country, and neither do we.
  -- George W. Bush
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Virtual Hosts

2003-06-18 Thread El 4Love




Hi All,

My IP registrar support me to have wildcards in my url and all those will be pointed to one IP address. I have apache set to run virtual hosts.

My virtual hosts at the moment are www.mydomain.com.au and me.mydomain.com.au. www.mydomain.com.au also has a server alias mydomain.com.au. But when I type a URL like blahblah.mydomain.com.au, it still opens www.mydomain.com.au.

How can I prevent this from going there and to display an error page when anything else is typed in the wildcard location?

Thanks many.

~Mahen.


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Virtual Hosts

2003-06-18 Thread CaT
On Wed, Jun 18, 2003 at 04:01:07PM +0800, El 4Love wrote:
 How can I prevent this from going there and to display an error page
 when anything else is typed in the wildcard location?

Have a generic virtual host setup as the first one. Something like
the name of the server or somesuch. What apache does is that if there's
no specific virtual host entry for the particular host, it decides
to use the first one that is available for that ip.

-- 
Martin's distress was in contrast to the bitter satisfaction of some
of his fellow marines as they surveyed the scene. The Iraqis are sick
people and we are the chemotherapy, said Corporal Ryan Dupre. I am
starting to hate this country. Wait till I get hold of a friggin' Iraqi.
No, I won't get hold of one. I'll just kill him.
- http://www.informationclearinghouse.info/article2479.htm
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Virtual Hosts

2003-06-18 Thread John Clarke
On Wed, Jun 18, 2003 at 04:01:07PM +0800, El 4Love wrote:

 My virtual hosts at the moment are www.mydomain.com.au and
 me.mydomain.com.au. www.mydomain.com.au also has a server alias
 mydomain.com.au.  But when I type a URL like
 blahblah.mydomain.com.au, it still opens www.mydomain.com.au.

If Apache doesn't recognise the host name sent by the client, the
default is to use the first VirtualHost instead.

 How can I prevent this from going there and to display an error page
 when anything else is typed in the wildcard location?

Setup a virtual host and use AliasMatch to redirect every request to
your error page.  Make it the first VirtualHost container in
httpd.conf.  Something like this should work:

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
ServerName error.mydomain.com.au
ErrorLog logs/error.mydomain.com.au/error_log
CustomLog logs/error.mydomain.com.au/access_log combined
DocumentRoot /var/www/error.mydomain.com.au/html
AliasMatch .* /var/www/error.mydomain.com.au/html/error.html
/VirtualHost

More info at:

http://httpd.apache.org/docs-2.0/
http://httpd.apache.org/docs-2.0/vhosts/name-based.html


Cheers,

John
-- 
whois [EMAIL PROTECTED]
GPG key id: 0xD59C360F
http://kirriwa.net/john/
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Virtual Hosts

2003-06-18 Thread El 4Love
Thankyou all, I have done it!

On Wed, 2003-06-18 at 16:39, John Clarke wrote:
 On Wed, Jun 18, 2003 at 04:01:07PM +0800, El 4Love wrote:
 
  My virtual hosts at the moment are www.mydomain.com.au and
  me.mydomain.com.au. www.mydomain.com.au also has a server alias
  mydomain.com.au.  But when I type a URL like
  blahblah.mydomain.com.au, it still opens www.mydomain.com.au.
 
 If Apache doesn't recognise the host name sent by the client, the
 default is to use the first VirtualHost instead.
 
  How can I prevent this from going there and to display an error page
  when anything else is typed in the wildcard location?
 
 Setup a virtual host and use AliasMatch to redirect every request to
 your error page.  Make it the first VirtualHost container in
 httpd.conf.  Something like this should work:
 
 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 ServerName error.mydomain.com.au
 ErrorLog logs/error.mydomain.com.au/error_log
 CustomLog logs/error.mydomain.com.au/access_log combined
 DocumentRoot /var/www/error.mydomain.com.au/html
 AliasMatch .* /var/www/error.mydomain.com.au/html/error.html
 /VirtualHost
 
 More info at:
 
 http://httpd.apache.org/docs-2.0/
 http://httpd.apache.org/docs-2.0/vhosts/name-based.html
 
 
 Cheers,
 
 John
 -- 
 whois [EMAIL PROTECTED]
 GPG key id: 0xD59C360F
 http://kirriwa.net/john/

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Virtual Hosts

2003-06-18 Thread mlh
On 18 Jun 2003 16:43:25 +0800
El 4Love [EMAIL PROTECTED] wrote:

 Thankyou all, I have done it!

Great!  And what was the solution to your performance
problem?  Share the knowledge!

Matt
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug