Can't serve PHP file with Nginx + Passenger but can serve PhpMyAdmin -


server: ubuntu 14.04 nginx-passenger.

my problem : can't show php file in http://www.domain.com/prueba/ phpmyadmin works in http://www.domain.com/phpmyadmin/ , rails server working correctly in http://www.domain.com.

but want have rails server , use php too.

i configured nginx passenger serve phpmyadmin page in

 location /phpmyadmin/ {   root /var/www/html/phpmyadmin;   index index.php index.html index.html;   passenger_enabled off; } 

and works when want serve php file <?php phpinfo(); ?> in folder /var/www/html/prueba named index.php, says 404 not found in page error not logged in nginx log, , configured well.

location /prueba/ {  root /var/www/html;  index index.php;  passenger_enabled off; } 

what error?

here's full config file.

server {  listen 80 default_server;  server_name domain.com www.domain.com;  location / {  root /var/www/rails_project/current/public;  passenger_enabled on;  passenger_app_env production;  passenger_ruby /home/user/.rvm/wrappers/ruby-2.2.0/ruby;  passenger_buffer_response off; }  location /prueba/ {  root /var/www/html;  index index.php;  passenger_enabled off; }   location /phpmyadmin/ {   root /var/www/html/phpmyadmin;   index index.php index.html index.html;   passenger_enabled off; }  location ~ \.php$ {        try_files $uri =404;        fastcgi_split_path_info ^(.+\.php)(/.+)$;        fastcgi_pass unix:/var/run/php5-fpm.sock;        fastcgi_index index.php;        fastcgi_param script_filename $document_root$fastcgi_script_name;        include fastcgi_params; } } 

looks didn't put in correct path:

 location /prueba/ {  root /var/www/html; << here should /var/www/html/prueba  index index.php;  passenger_enabled off; } 

make sure file path correct.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -