[Nginx]
This is an open discussion with 4 replies, filed under Troubleshooting.
Search
Have you read this article yet? http://nbsp.io/symphony-cms/combine-symphony-cms-with-nginx
Here is mine:
Ubuntu 12.04.1 LTS Nginx 1.2.4, PHP 5.3.10-1ubuntu3.4 (fpm-fcgi), Mysql 5.5.28
server { listen 80; server_name domain.com; access_log /usr/share/nginx/www/domain.com/logs/access.log; error_log /usr/share/nginx/www/domain.com/logs/error.log; root /usr/share/nginx/www/domain.com/public_html; location / { index index.html index.htm index.php; # serve static files directly if (-f $request_filename) { access_log off; expires 30d; break; } ### BACKEND if ($request_filename ~ /symphony/) { rewrite ^/symphony/?$ /index.php?mode=administration&$query_string last; rewrite ^/symphony(/(.*/?))?$ /index.php?symphony-page=$1&mode=administration&$query_string last; } if ($request_filename ~ /admin/) { rewrite ^/admin/?$ /index.php?mode=administration&$query_string last; } #MINIFY REWRITE if ($request_filename ~ /min/) { rewrite ^/min/([a-z]=.*) /min/index.php?$1 last; } ### IMAGE RULES rewrite ^/image/(.+.(jpg|gif|jpeg|png|bmp|ico|JPG|GIF|JPEG|PNG|BMP|ICO))$ /extensions/jit_image_manipulation/lib/image.php?param=$1 last; ### CHECK FOR TRAILING SLASH - Will ignore files if (!-f $request_filename) { rewrite ^/(.*[^/]+)$ /$1/ permanent; } ### MAIN REWRITE - This will ignore directories if (!-d $request_filename) { rewrite ^/(.*)$ /index.php?symphony-page=$1 last; } } location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/tmp/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /.ht { access_log off; log_not_found off; deny all; } }
Yes Allen, i have read that page, didn't work.
Kamwing, well basicaly it's a common file configuration.
I try to get Symphony working only on subfolder: ******.com/portfolio/
But it show the page only, i can't access to administration panel else than manually doing: ******.com/portfolio/index.php?symphony-page=$1&mode=administration.
Maybe i'm wrong.
Tested with your configuration file kamwing, when i go to .com/portfolio/symphony/ it gives:
403 Forbidden nginx/1.2.4
Here sample:
location /portfolio/ { index index.html index.htm index.php; # serve static files directly if (-f $request_filename) { access_log off; expires 30d; break; } ### BACKEND if ($request_filename ~ /symphony/) { rewrite ^/symphony/?$ /index.php?mode=administration&$query_string last; rewrite ^/symphony(/(.*/?))?$ /index.php?symphony-page=$1&mode=administration&$query_string last; } if ($request_filename ~ /admin/) { rewrite ^/admin/?$ /index.php?mode=administration&$query_string last; } #MINIFY REWRITE if ($request_filename ~ /min/) { rewrite ^/min/([a-z]=.*) /min/index.php?$1 last; } ### IMAGE RULES rewrite ^/image/(.+.(jpg|gif|jpeg|png|bmp|ico|JPG|GIF|JPEG|PNG|BMP|ICO))$ /extensions/jit_image_manipulation/lib/image.php?param=$1 last; ### CHECK FOR TRAILING SLASH - Will ignore files if (!-f $request_filename) { rewrite ^/(.*[^/]+)$ /$1/ permanent; } ### MAIN REWRITE - This will ignore directories if (!-d $request_filename) { rewrite ^/(.*)$ /index.php?symphony-page=$1 last; } }
Create an account or sign in to comment.
Hello,
I'm currently running on the following specs: Nginx 1.2.4 Php 5.3.17-1 Xcache 2.0.1 Zend Engine v2.3.0 Mysql-Server 5.5
Linux Debian 6 Squeeze, Stable.
Modules actuels: /etc/php5/fpm/conf.d/curl.ini, /etc/php5/fpm/conf.d/gd.ini, /etc/php5/fpm/conf.d/mcrypt.ini, /etc/php5/fpm/conf.d/mysql.ini, /etc/php5/fpm/conf.d/mysqli.ini, /etc/php5/fpm/conf.d/oci8.ini, /etc/php5/fpm/conf.d/pdo.ini, /etc/php5/fpm/conf.d/pdo_mysql.ini, /etc/php5/fpm/conf.d/redis.ini, /etc/php5/fpm/conf.d/suhosin.ini, /etc/php5/fpm/conf.d/xcache.ini, /etc/php5/fpm/conf.d/xsl.ini
Actually, the installation process went smoothly, but i cannot access to admin panel and there is bugs on articles, i cannot view pages on it.
It's currently on one subfolder on /var/www/ which is root directory, then symphony is stored into /var/www/portfolio/
Here is my configuration file:
I'm pretty new into symphony, but well, I just couldn't make it working even with a lot of samples configuration files.
I only can access into the welcome page, and that's all.
If someone wants more detailed infos, Feels free.
Thanks in advance.