Score:0

PHP NGINX not working on a Subdomain

za flag

I have a Sub Domain"

ad.example.com and I am trying to install a CMS and it get stuck at install.php with a 404 not Found error

server {
    access_log /var/log/nginx/ad.example.com.access.log;

    error_log /var/log/nginx/ad.example.com.error.log;

    listen 8000;
    #listen [::]:80 default_server;
    server_name  ad.example.com;
    root   /usr/local/www/ad.example.com/html;


    location / {
       index  index.php index.html index.htm;
       try_files $uri $uri/ /index.php?$args;

    }
    location ~ \.php$ {
         
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
         
         fastcgi_pass   unix:/var/run/php-fpm.sock;
         fastcgi_index  index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include        fastcgi_params;
    }

Although i can check ad.example.com/info.php it works but ad.example.com/www/admin/info.php does not work ad.example.com/www/admin/install.php 404 Error Not Found

us flag
Where are your CMS files?
Abel avatar
za flag
CMS FIles are in the HTML Folder but the install.php is in the Admin Folder. so the path that is generated is html/www/admin/install.php.. i reconfigured the root to /...../html/www/admin but still the same error
us flag
Just to confirm, CMS files are in `/usr/local/www/ad.example.com/html` and admin folder is at `/usr/local/www/ad.example.com/html/www/admin`?
Abel avatar
za flag
yes I confirm CMS files are in /usr/local/www/ad.example.com/html and admin folder is at /usr/local/www/ad.example.com/html/www/admin
Abel avatar
za flag
Anybody can help?
Abel avatar
za flag
Issue Resolved, Changed the default server back to port 80
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.