httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amira Othman" <>
Subject RE: [users@httpd] subdomains
Date Tue, 12 Jul 2011 08:33:40 GMT
Hello Jeroen

I tried to send you configuration file the virtual host part and logs but it
can't be send L so would you please send me w website that explains how to
have subdomain in apache


Hello Jeroen

Thanks for reply.I already created 2 virtual host one pointing to (its
document root) /mydomain and the other is pointing to /mydomain/admin

Don't do that.
VirtualHosts should never overlap, as unexpected things will happen and
access controls become... interesting.

the problem is I want admin.mydomain 

Not mentioned above; please understand that a virtualhost is defined by a
Servername and a Documentroot.

It is neither of those things by itself, and neither of those things is
directly related to the other, either.

The virtualhost is what relates them.

to work correctly while it does not because each time I type url it load the
correct index.php but after that everything goes wrong 

That's not very descriptive.
Include the relevant configuration and logs that show the issue.

and log file has error that file does not exist because it search for it in
wrong path. It always search for it under /mydomain/admin/ while files
actually exist under /mydomain. The files that located in /mydomain/admin
works fine .sorry but I am new to apache .that is how I understand the
problem but I don't know what to do.

You should take a long, hard look at the documentation for virtual hosting:

This explains several key concepts.




From: Jeroen Geilman [] 
Sent: Tuesday, July 05, 2011 10:23 PM
Subject: Re: [users@httpd] subdomains


On 2011-07-05 15:20, Amira Othman wrote: 

Hi All,

I am using httpd-2.2.3-43.3 

That's pretty old.

on centos 5.6.

Ah, that explains that.

I created subdomain 

A whut ? Apache doesn't know or care about "domains". 
A hostname is a hostname.

,it works fine except when calling image I found in log file that it goes to
wrong path

How so ? 
Do you have logs and configuration that show this ?

although I am writing the correct one in document root     works fine

That's not a documentroot; it points to a subdirectory of the documentroot.        fine but images have wrong path

That's not a documentroot either, but a fully-qualified hostname, different
from the one above.
Typically, that indicates that this is a different vhost, ergo a separate



Amira Othman

Server Administrator



6 EL Nil EL Abyad, Mohandiseen 

Cairo, Egypt

Direct:     +2 02 3303 7175
Mobile:   +2 012 220 4165



The information transmitted is intended solely for the individual or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you have received this email
in error please contact the sender and delete the material from any

You're posting to a publically archived mailing list.
Should I delete the message ? 



View raw message