Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alias: PHP files don't execute

Status
Not open for further replies.

benjabievres

Technical User
Jun 1, 2012
1
FR
Hello,
i'm using Apache2 in Lunix CentOS 5

I configured a new vhost (using Plesk). The PHP files execute well in the directories configured for that vhost.

But because it's a new server, and because the public domain name corresponding to that vhost points to an older server, i need to configure the default host of my new server to point to the same directories (for integration tests with external applications).

So i modified httpd.conf so that an alias points to the same root directory than my vhost:

Alias /demo/ "/var/www/vhosts/mondomaine.com/httpdocs/demo/"

<Directory "/var/www/vhosts/mondomaine.com/httpdocs/demo/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>


now, if i use the ip address of my server instead of the domain name, it finds the correct directory. But, instead of executing the PHP files, the files are downloaded by the browser, as if they weren't recognized as PHP scripts.

Is there anything else i should do to make the PHP execute as well when i use the ip address instead of the domain name?

thank you for your help

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top