Jump to content

Apache + PHP


Guest Maqueo
 Share

Recommended Posts

Guest Maqueo

Hi guys,

 

I've got Apache running locally (under MDK 10) for testing my PHP stuff. The problem I've run into is that a php file like /var/www/html/index.php parses OK, but a subdirectory like /var/www/html/whatever/index.php doesn't! Instead the browser asks if I'd like to open or save the file...

 

Any insights?

 

Cheers,

Maqueo

Link to comment
Share on other sites

Guest Maqueo

Sorry, my bad. It seems it's not parsing anything located at /var/www/html either. Seems the configuration just ain't right.

 

I'll post if I find the reason, but it sound like something really simple (total n00b here ;))

Link to comment
Share on other sites

Guest Maqueo

Hi,

 

I haven't installed mod_php manually, no, but the php files were parsing fine earlier. It seems the problem is the new .htaccess file I've created.

 

Content is:

  AuthName "restricted stuff"
 AuthType Basic
 AuthUserFile /var/www/html/.htpasswd
 AddType application/x-httpd-php .php

 require valid-user

 

Thanks,

Maqueo

Link to comment
Share on other sites

Guest Maqueo
You must have "AllowOverride AuthConfig" in effect for those  directives to  work in Apache.

 

My guess is this doesn't go into the .htaccess file :devil: - Apache crashes now:

500 - Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...