Hey Guys, im new to phalcon framework and got problems with the configuration of two virtual hosts. Im running a root server with nginx and phalcon. When i configurate my nginx default-file with only one host with a root folder, everything works fine like explained in the Installation-Notes from phalcon documentation. But when i try to run another virtual host, there are several problems which i cant fix. This forum is my last hope ;-). The root-page of both pages are working fine. For demonstration i will name it "page1" and "page2". BaseURI of page1 is "/page1/" and second "/page2/".
First Problem: There is a Link and a SignupController to a Signup-Page in both Projects. The link which is generated by phalcon is wrong for a (for me) unknown reason. It is: "domain.com/page1/PUBLIC/signup". So clicking on the Signup-Link, brings you to a "404 Not Found"-page. In my example project with apache and only one host with a root directory everything works fine and the generated link was "domain.com/page1/signup" and the page worked fine.
Second Problem: When i type in the "correct" url manually "domain.com/page1/signup" i come onto the main-page?! It seems that the rewriting/redirecting doesnt work correct ?!
My nginx default - file looks like this: server {
listen 81;
server_name domain.com;
#index index.php index.html index.htm;
set $root_path '/usr/share/nginx/www';
root $root_path;
location ^~ /page1/ {
root /usr/share/nginx/www/page1/public ;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
rewrite ^(.*)$ /page1/public/index.php?_url=/$1;
}
location ^~ /page1/public/ {
index index.php index.html index.htm;
include /etc/nginx/conf/php;
}
location ~*^/page1/public/(css|img|js|flv|swf|download)/(.+)$ {
root /usr/share/nginx/www/page1/public;
}
location ^~ /page2/ {
root /usr/share/nginx/www/page2/public ;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
rewrite ^(.*)$ /page2/public/index.php?_url=/$1;
}
location ^~ /page2/public/ {
index index.php index.html index.htm;
include /etc/nginx/conf/php;
}
location ~*^/page2/public/(css|img|js|flv|swf|download)/(.+)$ {
root /usr/share/nginx/www/page2/public;
}
location ~ /\.ht {
deny all;
}
}
Can anyone help me, please? :(