LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-19-2015, 02:20 PM   #1
GrowShall
LQ Newbie
 
Registered: Nov 2015
Posts: 1

Rep: Reputation: Disabled
Question Apache 2.4 on Ubuntu 14 refuses to load index.php even though PHP loads


My apache won't load a index.php one one of my vhosts not even if I type in example.com/index.php. I have two and one works fine.

The second vhost is my issue.

Any help would be appreciated, idk what changed between apache and php version but I am missing something. Any help would be appreciated.

I am posting both vhosts .conf below exact copies.

First one:


<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain1.com
ServerAlias www.domain1.com
DocumentRoot /var/www/domain1.com/htdocs
DirectoryIndex index.php
<Directory />
AllowOverride All
</Directory>
<Directory /var/www/domain1.com/htdocs>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/domain1.com-error.log
LogLevel error
CustomLog /var/log/apache2/domain1.com-access.log combined

<IfModule security2_module>
SecRuleEngine Off
</IfModule>

phpMyAdmin default Apache configuration
Alias /ms /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php

phpflag magicquotesgpc Off
phpflag trackvars On
phpflag registerglobals Off
phpadminflag allowurlfopen Off
phpvalue includepath .
phpadminvalue uploadtmpdir /var/lib/phpmyadmin/tmp
phpadminvalue openbasedir
</IfModule>

</Directory>


<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>


<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>

</VirtualHost>
Second one:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain2.com
ServerAlias www.domain2.com
DocumentRoot /var/www/domain2.com
<IfModule dir_module>
DirectoryIndex index.html
DirectoryIndex index.php
</IfModule>
<Directory />
AllowOverride All
</Directory>
<Directory /var/www/domain2.com>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/domain2.com-error.log
LogLevel debug
CustomLog /var/log/apache2/domain2.com-access.log combined
</VirtualHost>
 
Old 11-22-2015, 12:06 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You should post what you get in the error.log when you try to access index.php
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache requires index.php. The requested URL /index.php was not found on this server chefarov Linux - Server 4 07-30-2014 02:29 AM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 01:55 AM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
installed php and apache yet my php pages dont load ?? jessica_lilly Linux - Software 1 11-13-2007 01:57 AM
Apache php index.php problem neurotic Linux - Software 3 11-18-2003 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration