Souparno Majumder Souparno Majumder - 2 months ago 21
Apache Configuration Question

server ip keeps redirecting to defaultwebpage.cgi

I haven't registered any domain for my server.
I might be wrong, but according to my understanding,
the default ip for the server is public.
my server ip is http://166.62.101.242/.
but whenever i ping on that domain, it keeps redirecting to the

/usr/local/cpanel/cgi-sys/defaultwebpage.cgi

folder.
I have changed my
/etc/httpd/conf/httpd.conf


<VirtualHost *:80>
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>




however it still keeps redirecting to the cpanel page.

what changes do i need to make, so i can access the
/var/www
folder without registering for a domain?

Answer

It seems there is error in processing .php file in apache. I have got same problem. change the ownership of the file. e.g. if the file name ins info.php

sudo chown nobody:nobody info.php
sudo chmod 644 info.php

Let me know if this help

Also make sure to add .php in

sudo vim /etc/httpd/apache/conf

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .php