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 Commented 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 Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.