Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 5th November 2012, 11:47
Totenkopf Totenkopf is offline
Junior Member
Join Date: Oct 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On CentOS 6.3


Im currently running several shopware4 installations on an apache server with mod_php and pure-ftp, but ive got the problem, that i cant use the ftp server properly, because of mod_php. Now i wanted to make a sampole installation inside a VM with nginx and php-fpm and i already understood the syntax of nginx config files, but i cvant manage to get the installation of shopware running, because of the redirect rules. I can open my shopware basic folder, with the warning, that i should install shopware first and i can see the first page of the installation process, but right after i tried to change the language, or to go to the 2nd step, i get thron back to the shopware.php main site with the warning.

First my configs:


user nginx;
worker_processes 4;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;

events {
worker_connections 1024;

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

## Detect when HTTPS is used
map $scheme $fastcgi_https {
default off;
https on;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
keepalive_timeout 2;

# Load config files from the /etc/nginx/conf.d directory
# The default server is in conf.d/default.conf
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;

server {
listen 80; # Listen to Port 80
server_name somesite.com; # Replace with Server-Name
access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/somesite.com; #Define doc-root
include /var/www/shopware.conf; #Include shopware specific nginx rules

# Use php-fpm as fast-cgi backend for all .php files
location ~ .php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;

# Shopware nginx rules
# version 1.0
# date 09.08.2011
# author Stefan Hamann <sth@shopware.de>

# Defining various options

# Set DirectoryIndex
index shopware.php index.php;

# Deny direct access to all smarty templates
location ~ ^/templates/.*/*.tpl {
deny all;

# Permit access to php files in web readable directories
location ~ ^/cache/.*/*.(php|cgi|php5|php3|php4|phtml|pl|py) {
deny all;
location ~ ^/images/.*/*.(php|cgi|php5|php3|php4|phtml|pl|py) {
deny all;
location ~ ^/files/.*/*.(php|cgi|php5|php3|php4|phtml|pl|py) {
deny all;
location ~ ^/upload/.*/*.(php|cgi|php5|php3|php4|phtml|pl|py) {
deny all;

# Defining rewrite rules
rewrite /images/ayww/(.*) /images/banner/$1 last;
rewrite /files/documents/.* /engine last;
rewrite /templates/(.*(css|js))$ /engine/backend/php/sCacheTemplate.php?file=/templates/$1 last;
rewrite /sitemap.xml(.*) /shopware.php?controller=SitemapXml;
rewrite /application.yaml /engine last;
rewrite /engine/core/php/sAjaxSearch.php$ /engine/backend/php/sAjaxSearch.php last;
rewrite /engine/core/php/campaigns.php$ /engine/backend/php/campaigns.php last;

# Defining controller based route processing behaviour
if (!-e $request_filename) {
rewrite . /shopware.php last;
I do have a somesite.com.vhost file to, located at /etc/nginx/sites-available with link to sites-enabled, but this one is ignored...

Any ideas or suggestions?
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Symlink errors when trying to install ISPConfig 3.0.4 por Installation/Configuration 1 27th November 2011 16:40
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
nginx Php5 MySQL on ubuntu 9.04 haloangelboy HOWTO-Related Questions 1 8th September 2009 14:59
How to update mySQL and PHP5 on CentOS 4.5 (Final) micko_escalade Installation/Configuration 1 10th August 2007 18:17
eaccelerator installation - can't find php5-config tom Programming/Scripts 9 15th May 2006 16:36

All times are GMT +2. The time now is 15:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.