Serve Directory with URL Rewrite Enabled
June 23, 2015 03:49PM
Hi,

I have spent a lot of time and shed many tears trying to get functionality similar to apache aliasing. I need a Zend Framework application to be served from within a directory. I can't get any configuration that works. Any help appreciated. Here's the closest setup I have had

location ^~ /myapp/ {
alias /var/www/html/application/public/;

try_files $uri $uri/ /myapp/index.php;

location ~ \.php$ {
try_files $uri /index.php = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

}


This hits the index.php and cannot route to the default controller. Also images , css, js are not loaded though they are in the public folder.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 193
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready