1

I try to install apache,php and mysql server by these commands.

yum install httpd
yum install php
install mysql-server mysql
service httpd start
service mysqld start to start your mysql server

after that,they were install completely,because I can make php file and run it by

php test.php
command. now I want to see this page with out ssh and in my browser,I type my VPS ip address in browser but it doesn't response to me.

test.php file is in var/www folder with 777 permission.

2
  • It shoud be under /var/www/html directory
    – ghm1014
    Aug 11, 2011 at 15:37
  • Does it just time out? Or are you getting an error such as file not found / forbidden? This could be a problem in many places. Start by checking your document root is in fact /var/www/ in /etc/httpd/conf/httpd.conf Aug 11, 2011 at 15:38

1 Answer 1

1

Check apache (httpd) configuration in /etc/httpd/conf/httpd.conf. For example, it maybe like this (my apache configuration on Debian):

<VirtualHost *:80>
    ServerName your-server-hostname
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>
</VirtualHost>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .