Welcome! Log In Create A New Profile

Advanced

Last roadblock changing from Apache: SSL & PHP

Philip Rhoades
May 14, 2017 06:44PM
People,

If I can solve this last problem (that I have just spent all night on),
I can completely replace Apache with Nginx. I am using RoundCubeMail as
my Webmail client - it is written in PHP (the only PHP thing on my
server) but it has been working happily with Apache for many years. I
have RCM in an SSL protected directory:

/home/ssl/webmail

When I couldn't get that working I tried testing the setup with a
simple:

/home/ssl/index.php

file that outputs PHP info (attached) - but I had exactly the same
problem with that - a blank screen except for a green block cursor in
the bottom right of the screen ie no text output in the browser and no
errors in any of the logs.

I also attach:

/etc/nginx/conf.d/php-fpm.conf

and:

/etc/php-fpm.d/www.conf

I would _really_ appreciate it if anyone could tell me what is wrong
with my configuration . . (running on Fedora 25 x86_64).

Thanks,

Phil.
--
Philip Rhoades

PO Box 896
Cowra NSW 2794
Australia
E-mail: phil@pricom.com.au# PHP-FPM FastCGI server
# network or unix domain socket configuration

upstream php {
server unix:/run/php-fpm/www.sock ;
}

server {
listen 443;
root /home/ssl ;
index index.php index.html index.htm;
server_name pricom.com.au ;

ssl on ;
# ssl_certificate should be pointed to the file with combined certificates (file you created in step 2)
ssl_certificate /etc/nginx/ssl/cert_chain.crt ;
# ssl_certificate_key should be pointed to the Private Key that has been generated with the CSR code that you have used for activation of the certificate.
ssl_certificate_key /etc/nginx/ssl/www.pricom.com.au.key ;

location / {
try_files $uri $uri/ =404;
}

location ~ .php$ {
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass php;
}
}

# server {
# listen 443 ;
# root /home/ssl ;
# index index.php index.html index.htm;
# server_name pricom.com.au ;
#
# ssl on ;
# # ssl_certificate should be pointed to the file with combined certificates (file you created in step 2)
# ssl_certificate /etc/nginx/ssl/cert_chain.crt ;
# # ssl_certificate_key should be pointed to the Private Key that has been generated with the CSR code that you have used for activation of the certificate.
# ssl_certificate_key /etc/nginx/ssl/www.pricom.com.au.key ;
#
# location / {
# try_files $uri $uri/ @missing;
# }
#
# location @missing {
# rewrite (.*) /index.php;
# }
#
# location ~ .php$ {
# fastcgi_index index.php;
# include fastcgi_params;
# fastcgi_pass php;
# }
# }



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Last roadblock changing from Apache: SSL & PHP

Philip Rhoades May 14, 2017 06:44PM

Re: Last roadblock changing from Apache: SSL & PHP #2

Philip Rhoades May 14, 2017 06:52PM

Re: Last roadblock changing from Apache: SSL & PHP #2

Rainer Duffner May 14, 2017 08:08PM

Re: Last roadblock changing from Apache: SSL & PHP #2

Philip Rhoades May 14, 2017 08:36PM

Re: Last roadblock changing from Apache: SSL & PHP

Steve Wilson May 14, 2017 07:44PM

Re: Last roadblock changing from Apache: SSL & PHP - SUCCESS!

Philip Rhoades May 14, 2017 08:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready