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

I am getting default cgi [http://xx.xxx.xxx.xxx/cgi-sys/defaultwebpage.cgi]page even after placing index.php in the root/public_html folder.

The Httpd Conf on my VPS have the following entry

<VirtualHost 127.0.0.1:80 *>
    ServerName server1.mydomain.com
    ServerAlias cpanel.* whm.* webmail.* webdisk.* autodiscover.* autoconfig.*
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@mydomain.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    RewriteEngine On
    <IfModule core.c>
        SSLProxyEngine On
    </IfModule>
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
    RewriteCond %{HTTP_HOST} ^whm\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
    RewriteCond %{HTTP_HOST} ^webdisk\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
    RewriteCond %{HTTP_HOST} ^whm\.
    RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
    RewriteCond %{HTTP_HOST} ^webdisk\.
    RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
    RewriteCond %{HTTP_HOST} ^autodiscover\.
    RewriteRule ^[^?]*(\?.*)? http://127.0.0.1/cgi-sys/autodiscover.cgi [P]
    RewriteCond %{HTTP_HOST} ^autoconfig\.
    RewriteRule ^[^?]*(\?.*)? http://127.0.0.1/cgi-sys/autoconfig.cgi [P]
    UseCanonicalName Off
</VirtualHost>

What changes i need to make such that the dedicated IP loads the index.php from public_html folder.

Please help

share|improve this question

closed as off-topic by masegaloeh, peterh, mdpc, Hyppy, Khaled Apr 30 at 14:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

Your documentroot will need to change from DocumentRoot /usr/local/apache/htdocs

to

DocumentRoot /root/public_html

/root is an unusual place to have public html and if you have selinux running you will be blocked from accessing it there, check with sestatus if in doubt

If you still have no luck try a basic vhost like the below and then gradually change the entries for those from yours above until you spot your problem

<VirtualHost xx.xx.xx.xx:80>
    ServerName server1.mydomain.com
    DocumentRoot /root/public_html
    DirectoryIndex index.php
    <Directory /root/public_html>
     order allow, deny
     allow from all
    </Directory
</VirtualHost>
share|improve this answer
    
Thanks moz tech ... It worked –  Clain Dsilva Aug 25 '13 at 17:24

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