LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-02-2006, 03:18 PM   #1
wandering
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Rep: Reputation: 0
trying to install suse 10.1 with rpm/package apache and php5/ssl problems??


Hi there all,

I've installed Suse 10.1 (64bit) onto a server and installed the latest versions of apache/php5 from suse yast package selection.

Php appears to work perfectly in the non-ssl default website (ie with index.php containing <?php phpinfo(); ?> it prints out what you'd expect it to print out) but when I try to run an ssl-enabled virtual-host and open a .php page, I get "please select whether to open this file or save it" as if the webserver doesn't know how to use php to interpret the file (ie addtype etc).

I can't find anywhere that details how to successfully fix this... any ideas please anyone?

Please find below the httpd.conf, listen.conf, loadmodules.conf and ssl vhost conf file.

Thanks for any and all advice.


Daryn

------------------------------------------------------------------------------------------------------------------------------------------------

/etc/apache2/httpd.conf

### Global Environment ######################################################
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests.

# run under this user/group id
Include /etc/apache2/uid.conf

# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf

# 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 /var/log/apache2/error_log

# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf

# IP addresses / ports to listen on
Include /etc/apache2/listen.conf

# predefined logging formats
Include /etc/apache2/mod_log_config.conf

# generated from global settings in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/global.conf

# optional mod_status, mod_info
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf

# optional cookie-based user tracking
# read the documentation before using it!!
Include /etc/apache2/mod_usertrack.conf

# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf

# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

# set up (customizable) error responses
Include /etc/apache2/errors.conf

# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var index.php

### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf


# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf


### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf


# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier

Include /etc/apache2/conf.d/*

------------------------------------------------------------------------------------------------------------------------------------------------

listen.conf

Listen 80


Listen 443
Listen 447

NameVirtualHost *:447

------------------------------------------------------------------------------------------------------------------------------------------------


/etc/apache2/sysconfig.d/loadmodule.conf

#
# Files in this directory are created at apache start time by /usr/sbin/rcapache2
# Do not edit them!
#

# as listed in APACHE_MODULES (/etc/sysconfig/apache2)

LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
LoadModule authz_default_module /usr/lib64/apache2-prefork/mod_authz_default.so
LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
LoadModule authn_dbm_module /usr/lib64/apache2-prefork/mod_authn_dbm.so
LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
LoadModule suexec_module /usr/lib64/apache2-prefork/mod_suexec.so
LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
LoadModule php5_module /usr/lib64/apache2/mod_php5.so
LoadModule status_module /usr/lib64/apache2-prefork/mod_status.so
#


------------------------------------------------------------------------------------------------------------------------------------------------

ssl-vhost-testserver.conf (vhost.com etc is obviously fake for this question)

<VirtualHost *:447>

DocumentRoot /srv/www/htdocs
ServerName vhost.com:447
ServerAdmin blah@vhost.com
ServerAlias vhost.com

ErrorLog /var/log/apache2/vhost-ssl_error_log
TransferLog /var/log/apache2/vhost-ssl_access_log

Include /etc/apache2/conf.d/php5.conf

SSLEngine On
SSLCertificateFile /etc/apache2/ssl.crt/vhost.com-server.crt
SSLCertificatekeyFile /etc/apache2/ssl.key/vhost.com-server.key
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

# <Files ~ "\.(cgi|shtml|phtml|php3?)$">
# SSLOptions +StdEnvVars
# </Files>

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
</Files>

#<Directory "/srv/www/cgi-bin">
# SSLOptions +StdEnvVars
#</Directory>

# SSL Protocol Adjustments:
# The safe and default but still SSL/TLS standard compliant shutdown
# approach is that mod_ssl sends the close notify alert but doesn't wait for
# the close notify alert from client. When you need a different shutdown
# approach you can use one of the following variables:
# o ssl-unclean-shutdown:
# This forces an unclean shutdown when the connection is closed, i.e. no
# SSL close notify alert is send or allowed to received. This violates
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
# this when you receive I/O errors because of the standard approach where
# mod_ssl sends the close notify alert.
# o ssl-accurate-shutdown:
# This forces an accurate shutdown when the connection is closed, i.e. a
# SSL close notify alert is send and mod_ssl waits for the close notify
# alert of the client. This is 100% SSL/TLS standard compliant, but in
# practice often causes hanging connections with brain-dead browsers. Use
# this only for browsers where you know that their SSL implementation
# works correctly.
# Notice: Most problems of broken clients are also related to the HTTP
# keep-alive facility, so you usually additionally want to disable
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
# "force-response-1.0" for this.
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
CustomLog /var/log/apache2/vhosttest-ssl_request_log ssl_combined

<directory /srv/www/htdocs>
Options Indexes FollowSymLinks
</directory>
</VirtualHost>
 
Old 07-03-2006, 12:20 PM   #2
sdexp
Member
 
Registered: Sep 2003
Location: USA
Distribution: Ubuntu Linux
Posts: 103

Rep: Reputation: 15
I'm not too sure about these lines because I have never actually seen them used:

Code:
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
</Files>
Try removing those lines and see if it works, because I think what they do is output plain PHP rather than let PHP get interpreted.

You may want to look into the /etc/apache2/conf.d/php5.conf file to see if any options there have changed whether PHP is interpreted in virtual hosts.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSE 10.1 won't install SuSE rpm package alfredh Suse/Novell 6 07-01-2006 08:32 AM
Problems configuring apache for php5 Besnell Mandriva 3 12-28-2004 09:01 AM
SSL on Apache 2.0 --SuSE 9.0 randomx Linux - Networking 0 05-17-2004 08:50 PM
Apache and SSL problems Pete Dogg Linux - Software 2 06-12-2003 12:05 PM
RH9 Apache/SSL/PHP/MySQL RPM vs tar.gz Ani Linux - Newbie 5 04-26-2003 10:43 AM


All times are GMT -5. The time now is 04:23 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