I currently have 2 PHP applications up and running on my DigitalOcean's Ubuntu server. There is a third one as well, but it's not working. All three PHP projects are configured to run on different ports. Meanwhile, using NGINX server I have configured a reverse proxy. The configuration is as given below.
/etc/nginx/nginix.conf
server {
listen 80;
server_name IP;
location / {
#Assinged to a python project
}
location /php_project_1 {
proxy_pass http://IP:5002;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
}
location /php_project_2 {
proxy_pass http://IP:5003;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
}
location /php_project_3 {
proxy_pass http://IP:5004;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
}
}
I have also created 3 configuration files in /etc/apache2/sites-available.
PROBLEM
php_project_1 and php_project_2 are developed using core PHP and they work fine.
php_project_3 is developed using codeigniter. and that is the project which is causing me problems. Inside this project, under /application/config/config.php I have modified $config['base_url']
and entered the values as http://IP/php_project_3.
However, when I hit the URL http://IP/php_project_3
, I get a blank page.
I also checked /var/logs/apache2 and /var/logs/nginx, however, the error.log file does not show any messages corresponding to my request.
Meanwhile, I can successfully run the other 2 applications using http://IP/php_project_1
and http://IP/php_project_2
I don't know how to troubleshoot this issue.