I installed ngnix, only home page works but other pages display 404

I installed ngnix, the home page of the website can be opened normally, but other pages display
404 Not Found
nginx/1.20.1

Hello @lhdptdh and welcome to the community.

And you installed Nginx how exactly? What are the steps that you took to install Nginx?

wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
./install.sh --bundle LEMP

2022/02/28 04:25:07 [error] 13418#13418: *13 open() “/home/20201207bijouxcharme.fr/public_html/bijoux-import-pandora-pandora-bracelets-essence-8851-p-4717.html” failed (2: No such file or directory), client: 172.70.174.92, server: 20201207bijouxcharme.fr, request: “GET /bijoux-import-pandora-pandora-bracelets-essence-8851-p-4717.html HTTP/1.1”

That’s the recommended way to install Virtualmin and you did the right thing, @lhdptdh . Your comment " I installed Nginx " made me think that you might have installed Nginx independently of Virtualmin, so I asked you to clarify.

I see from your subsequent posts that your directory structure is unusual. When default values are used, Virtualmin would create something like:

/home/bijouxcharme/public_html/bijoux-import-pandora-pandora-bracelets-essence-8851-p-4717.html

But you have:

/home/20201207bijouxcharme.fr/public_html/bijoux-import-pandora-pandora-bracelets-essence-8851-p-4717.html

Did you restore from a backup created by some other web hosting control panel? Additionally, if the links and urls are hard coded in your web app then it will produce the behaviour you describe - 404s for all links except the home page. Also your domain appears to be 20201207bijouxcharme.fr so you might want to find out how that happened.

If my panel uses Nginx , how do I set my pseudo-static, because Apache’s pseudo-static is controlled by the .htaccess file, but how should I set the pseudo-static for Nginx

Have you been able to solve the problem with 404s for all pages except the home page? If so, how did you manage to solve the problem plesse let us know.

I haven’t solved this yet, but I feel it should be the reason for pseudo-static, I want to know, if I use ngnix, how should I set pseudo-static

If the links and urls are hard coded in your web app then it will produce the behaviour you describe - 404s for all links except the home page. Also your domain appears to be 20201207bijouxcharme.fr so you might want to find out how that happened.

No, this domain name doesn’t matter, I have changed it, but there is still a problem,

Hey, I am able to access the home page as well as other pages on the website.

The problem that you had initially outlined has been solved, but you do have one or more other issues with your website. The first of these is that the SLL certificate is not valid and it is due to this perhaps that you feel other pages are not showing.

I suggest you fix the SSL issue ASAP and then review. Then maybe start a new topic for each other issue.

no Because I replaced other panels, it can be used normally now, no 404 will appear, and other panels can be set to pseudo-static

Are you saying you have multiple control panels installed on the same system (or installed Virtualmin on a system after it had previously had some other control panel)? It’s unreasonable to expect that to ever work.

No, I just installed the Virtualmin panel, and then used ngnix, but my website has 404, I have been unable to solve this problem, I can’t find the configuration pseudo-static, then I reinstalled the server with a new system and replaced the new bt panel, bt panel solved my problem

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.