hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Apache does not read index.php in a particular directory
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Apache does not read index.php in a particular directory

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-22-2010, 06:44 PM
Marcelo Ramone Marcelo Ramone is offline
Junior Guru Wannabe
 
Join Date: Apr 2008
Location: Uruguay
Posts: 66

Apache does not read index.php in a particular directory


Hello All,

I can not believe this,

Apache don't find any index.php created under "mobile" directory, in the site's root in the document root directory (/var/www/virtuales), in any domain and subdomain of the server.



It is not a matter of owners, permits, VirtualHost misconfiguration, a global policy or unusual .htaccess, etc, just if I create the folder "mobile" within a virtual root and I put a index.php, does not read and gives 404, even a hello world or any code, and I see nothing in the logs ...

I deleted all virtual hosts from httpd.conf file, recreate all of them again, I restarted apache of course, review the settings, directives, etc, but no case only if the directory is called "mobile"

Even I put DirectoryIndex index.php to the left, to take with utmost priority, but no case.

I also put the directives in .htaccess to read the .php files in all directories and subdirectories, just in case, but it will not.

I tried with all permissions for the folder and the index, and with different owners as apache, nobody, but not walk.

Code:
httpd -v
Server version: Apache/2.2.3
Server built:   Mar  5 2010 04:42:29

php -v
PHP 5.1.6 (cli) (built: Jan  4 2010 10:45:24) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

<VirtualHost "IP">
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/virtuales/example.com
        <Directory "/var/www/virtuales/example.com">
                Options FollowSymLinks Includes
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

Alias /example.com /var/www/virtuales/example.com
Does anyone have any suggestions?

It is very rare!

Thanks in advance.

Reply With Quote


Sponsored Links
  #2  
Old 04-22-2010, 06:52 PM
MrGeneral MrGeneral is offline
Web Hosting Master
 
Join Date: Jan 2008
Location: Portugal
Posts: 783
Check Directory Index, should be: index.html index.php

__________________
Translator EN-PT / PT-EN | Sysadmin / Consultant / Bachelor in Marketing, Public Relationships and Publicity | Looking for a job. Contact me: mail@miguelsp.net
I currently recommend: InnoHosting.com, WebAngel.ie, XenVZ.co.uk, EDIS.at, Datashack.net and RamNode.com

Reply With Quote
  #3  
Old 04-22-2010, 06:53 PM
net net is offline
Community Liaison
 
Join Date: Mar 2003
Posts: 8,028
Moved > Hosting Security and Technology.

__________________
JoneSolutions.Com - Your Number One Choice On The Net - since 2001
----------------------------------------------------------------------------------------
Linux Shared and Reseller Hosting * KVM Fully Managed cPanel VPS * Super Special Servers
USA/EU cPanel Fully Managed Servers * cPanel Server Management * R1Soft/Idera Backup


Reply With Quote
Sponsored Links
  #4  
Old 04-22-2010, 06:59 PM
Marcelo Ramone Marcelo Ramone is offline
Junior Guru Wannabe
 
Join Date: Apr 2008
Location: Uruguay
Posts: 66
Originally in the DirectoryIndex, index php was put in the right and index html to the left, I put index php to the left to give max priority for the index.php

Now with: DirectoryIndex index.html index.php index.shtml index.htm don't works...

Thank you.-

Reply With Quote
  #5  
Old 04-23-2010, 04:25 AM
david510 david510 is offline
Web Hosting Master
 
Join Date: Oct 2004
Location: Kerala, India
Posts: 4,617
see if there any Alias made for mobile in the httpd.conf file.

__________________
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
iWebManager | Access WHM from iPhone and Android

Reply With Quote
  #6  
Old 04-23-2010, 04:45 AM
madaboutlinux madaboutlinux is offline
Web Hosting Master
 
Join Date: Jul 2009
Posts: 1,492
Is your "mobile" directory created under "/var/www/virtuales/example.com" OR /var/www/virtuales/" ?

If it is under /var/www/virtuales/ directory, you need to create an Alias in the VirtualHost of the domain, something like

Quote:
Alias /mobile /var/www/virtuales/example.com/mobile
This should allow you to access the mobile directory as www.example.com/mobile

BTW, remove the Alias you have set, which is

Quote:
Alias /example.com /var/www/virtuales/example.com
don't forget to restart the httpd service...

__________________
Linux WebHosting Solutions
http://linuxhostingsupport.net/blog/
MSN: madaboutlinux@hotmail.com

Reply With Quote
  #7  
Old 04-23-2010, 02:36 PM
Marcelo Ramone Marcelo Ramone is offline
Junior Guru Wannabe
 
Join Date: Apr 2008
Location: Uruguay
Posts: 66
Hello,

Is in "/var/www/virtuales/domain.com/movil/index.php

The alias in apache is for the domain: Alias /example.com /var/www/virtuales/example.com

In ANY domain, under movil directory, the index.php give me 404 (with ANY code)

Finally, but incredible, I deleted the VirtualHost in apache, restarted httpd, and re-created it at the end of the httpd.conf file, restarted and is working again.

But I can't explain how it's running and why don't ran before.

Incredible.

Thanks for the answers and sorry for my English.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
".#index.php" folder/file in www directory rougy Reseller Hosting 0 12-05-2008 09:00 PM
Setting index.html as default page instead of index.php? Joel Theodore Hosting Security and Technology 1 06-23-2008 11:53 AM
APACHE - .html / .php sometimes asks user to DOWNLOAD not READ ? The Initiate Hosting Security and Technology 2 08-13-2004 08:12 AM
index.htm & index.php Donnie-D Web Hosting Lounge 15 07-27-2004 08:19 AM
How to enable automatic display of README, HEADER, and index.txt in directory index? TMX Hosting Security and Technology 1 06-16-2002 08:19 PM

Related posts from TheWhir.com
Title Type Date Posted
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
nginx Continues Market Share Momentum in Netcraft February Web Server Survey Web Hosting News 2012-02-09 17:29:14
The Apache Software Foundation Launches Hadoop v1.0 Web Hosting News 2012-01-05 18:29:16
Oracle is the Latest Vendor to Apply Patch for Apache Killer Flaw Web Hosting News 2011-09-19 14:43:58


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?