LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 12-22-2012, 03:17 PM   #1
gal
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
Post no browser open index.php files but other *.php files working


I read about same problems but still didn't receive solution to my problem.
When I change the index.php to index2.php . the browser operate the file. but if it remain "index.php" the browser does't operate it ?
I need your simple help.

"""" the apache2.conf""""
#


#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
##<Files ~ "^\.ht">
## Order allow,deny
## Deny from all
## Satisfy all
##</Files>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostNameLookups off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include all the user configurations:
Include httpd.conf

# Include ports listing
Include ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/

Include /etc/squirrelmail/apache.conf
<Directory "/var">
DirectoryIndex index.html
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/prh
ServerName www.prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/prh"
ServerName mail.prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/prh"
ServerName prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName cpg.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName mail.cpg.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName el.prh.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elh.cpg.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elha.citrine-group.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elharar.cpg.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/fcl"
ServerName fcl.co.il
<Directory "/var/www/fcl">
allow from all
Options +Indexes
</Directory>
Alias any "www.fcp.co.il"
Redirect any "http://www.fcp.co.il"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName www.citrine-group.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>

AddType application/x-httpd-php .php
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>"""""
"""

""""the httpd.conf """
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
"""""
 
Old 12-23-2012, 08:09 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,389

Rep: Reputation: 97
Welcome to LQ!

What do you experience when loading
http://somedomain.org/index.php? Browser window remains white or does it show the content of index.php file?

Do you call the script explicitly or smply type http://somedomain.org?

Last edited by j-ray; 12-23-2012 at 08:10 AM.
 
Old 12-24-2012, 05:54 AM   #3
gal
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
remains white
I tried both...
 
Old 12-24-2012, 06:40 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,389

Rep: Reputation: 97
if it remains white then it is probably processed with an error. Set display_error = 1 in php ini or in the script write at the top
error_reporting(1);

Hope this helps
j
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 won't load index.php files foucault Linux - Software 11 03-20-2010 09:08 PM
Apache2 executes PHP files if specified, but not index.php will.fletcher Linux - Server 6 07-07-2009 09:27 PM
Apache2 won't load index.php files poojatangi Linux - Software 0 07-09-2008 06:22 PM
You have chosen to open index.php which is a : PHP Script from: http://localhost cucolin@ Linux - Software 3 01-30-2007 03:58 PM


All times are GMT -5. The time now is 04:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration