Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running CentOS 6.2 and I have in httpd.conf the following:

<VirtualHost *:80>
    ServerAdmin user@example.co.uk
     DocumentRoot /var/www/html/example.co.uk/public
    ServerName example.co.uk
    ErrorLog logs/example.co.uk-error_log
    CustomLog logs/example.co.uk-access_log common
</VirtualHost>
#user1 directory
<VirtualHost *:80>
    ServerAdmin user@example.co.uk
    DocumentRoot /home/user1/public_html    
    ServerName user1.example.co.uk
    ServerAlias www.example.co.uk
    ErrorLog logs/error_log
    CustomLog logs/user1-access_log common
</VirtualHost>
#user2 directory
<VirtualHost *:80>
    ServerAdmin user@example.co.uk
    DocumentRoot /home/user2/public_html
    ServerName user2.example.co.uk
    ServerAlias www.example.co.uk
    ErrorLog logs/error_log
    CustomLog logs/user2-access_log common
</VirtualHost>
#user3 directory
<VirtualHost *:80>
    ServerAdmin user@example.co.uk
     DocumentRoot /home/user3/public_html
    ServerName user3.example.co.uk
    ServerAlias www.example.co.uk
    ErrorLog logs/user3-error_log
    CustomLog logs/access_log common
</VirtualHost>

Those directories do exist I am able to see main virtual host(ServerName example.co.uk) and user2 when I navigate to http//exmaple.co.uk and http://user2.exmaple.co.uk but not user1 and user3. Can anyone spot any errors?

UPDATE Apche error log:

PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oci8.so' - libclntsh.so.11.1: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_oci.so' - libclntsh.so.11.1: cannot open shared object file: No such file or directory in Unknown on line 0
[Wed May 08 15:45:42 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.14 configured -- resuming normal operations
[Wed May 08 15:48:02 2013] [notice] caught SIGTERM, shutting down
[Wed May 08 15:48:03 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 08 15:48:03 2013] [notice] Digest: generating secret for digest authentication ...
[Wed May 08 15:48:03 2013] [notice] Digest: done
PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oci8.so' - libclntsh.so.11.1: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_oci.so' - libclntsh.so.11.1: cannot open shared object file: No such file or directory in Unknown on line 0
[Wed May 08 15:48:03 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.14 configured -- resuming normal operations

enter image description here

Same error over and over again but the user2 subdomain works fine? I have kept the ServerAlia only on the main one pointing to my www folder. Stoll broken? :(

share|improve this question
    
The error-log for the other two users are blank which makes me suspect when I navigate to their subdomains it's not even hitting their VH directives? –  Nathan Daly May 8 '13 at 16:05

1 Answer 1

up vote 2 down vote accepted

You are using the same ServerAlias on all your vhosts.... Thats definitly an error - we'll see if this is related to your problem.

If it's still not working we need the output from your logs and some information what your browser says.

share|improve this answer
    
Added the erro-log info the browser just displays the the normal chrome oops page (similar to the one pictured) with no headers or console/network errors? :S –  Nathan Daly May 8 '13 at 15:54
1  
Is your DNS set up correctly? (so - can you resolve the IP adress from your non-working subdomains?) –  Pascal Schmiel May 8 '13 at 16:04
    
I can't think how I would check off the top of my head, how would I resolve the IP? –  Nathan Daly May 8 '13 at 16:06
1  
ping user1.example.com has to resolve to your servers IP address –  Pascal Schmiel May 8 '13 at 16:08
1  
ping user2.example.com - that should be working i think? for details you have to check your nameserver config :) –  Pascal Schmiel May 8 '13 at 16:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.