CyberPanel Community

New website returns 404 and log files wasn't created on the server

AD
Andre Dsousa #1

index.html in public_html
public_html

No logs found
logs

Preview respond 404

The 404 is happening in every single website no matter how it is created. (manually created index.html is created automatically, wordpress import, cpanel import)

32 replies
NK
Nitesh Kunnath #2

You need to make sure the Openlitespeed is restarted or try restart the whole server once and see if it still shows such error.

Let us know the result here.

ds
dsousandre #3

Same here… @die2mrw007

I have restarted the vps with no success.

I just did systemctl restart lsws and nothing solves.

Restarted again the server sudo reboot same 404 response.

NK
Nitesh Kunnath #4

So what are the contents of website? Is it wordpress?
Make sure you have htaccess file inside your website folder (probably public_html). If not, then create a new file named .htaccess and then copy paste the default wordpress code of htaccess inside it and then restart server and see it if works fine.

sh
shoaibkk #5

Please check URL i can see that you are trying to open IP:8090/website please open only website URL it will be fine

AD
Andre Dsousa #6

:smile: it uses the Cyberpanel ports when you ask for the preview page.

NK
Nitesh Kunnath #7

Actually preview that way doesnt work.

Why dont you use a seperate domain or subdomain and restore your wordpress there and test everything?

AD
Andre Dsousa #8

It seems like the webserver has broken.

It was not a wordpress site. just plain html file, also on new websites the cyberpanel index.html did not load, it just keeps returns 404 page.

I can not keep looking how to fix this, more than make a clean installation of everything again.

NK
Nitesh Kunnath #9

No need for reinstall actually. You must reboot your server for vhost changes to take effect. Try it and see if it works for you.
Or maybe there is htaccess file missing in your website directory. If so, just create a new file named .htaccess and then copy paste this content in it:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

AD
Andre Dsousa #10

Thank @die2mrw007 but you forgot this little issue.

I did the .htaccess but did not fixe it :confused:

NK
Nitesh Kunnath #11

Just private message me with details such as your server IP and the domain name
and also a temporary login if possible to check things.

lu
luis #13

ERROR 404 INSTALLING WORDPRESS.
steps i did.
1.created a new website , in this case i created a subdomain, bacause i have alreade create a main domain. it did created the subdomain i confirmed checking the files with and FTP client. and all the generated files are there.
2. then i selected the subdomain that i have created, and select the option MANAGE then clicked on WP +LSCACHE and it looks like is doing its magic but after like 20 seconds it shows a 404ERROR.
3 i checked if there was any changes on the files in the subdomain folder it yes it loaded all the WORDPRESS FILES then i visited the subdomain and it show an ERROR ESTABLISHING A DATABASE CONNECTION.
4. I checked the databases and there was no database created for this subdomain it did no created any database at all. can someone tell me what’s going on.
i already reboot the server by running a reboot
also did the systemctl restart lsws
and still does not work…

server details digital ocean
1GB RAM
1 AMD vCPU
25GB DISK

i attached images to reference my description

Ma
Marcelo #16

Check any conflict with Apache2

apache2 stop

Check Litespeed domain.com:7080
Listen 80 and 443 are ON ??

MK
Mirza Khadnezar S [sick] #18

if you get 404
its look like you are under Cloudflare
if so…
pause site
purge all cache

create test.html under public_html
insert any text (example:

<h1>success</h1>

save it

close browser
open run command (eg.windows cmd)
type ipconfig /flushdns

recall the URI : http://yourdomain.tld/test.html
if success
then it’s the time to talk about failed wordpress installation
(but later after 404 problem solved

lu
luis #19

The 404 error happens when im installing wordpress and litespeed, it loos like is doing its thing but after few seconds the installation fail saying “INSTALLATION FAILED: ERROR MESSAGE: [404]”, the installation proccess from cyber panel loads the files into the subdomain that i previus created i verified i login with filezilla and the wordpress files were loaded into the subdomain folder, but no database was creaed it looks like the problem happens in the process between creating wordpress and database. because it did no created any database, refer to the image i uploaded it show the error, im able to create the domain but when im installing wordpress thats when i get the error on cyberpanel, i created another subdomain but this time i did not install wordpress i only uploaded an index.html and css file that a created and it works,

MK
Mirza Khadnezar S [sick] #20

you cant install both in same times and they are different cms and system

upgrade your cyberpanel ? have you do this ?

MK
Mirza Khadnezar S [sick] #22

for now
cyberpanel is 2.1.2 but different day different silent update
sometimes make more trouble…but sometimes more improvment…

try to run aptget update upgrade or yum
then upgrade cyberpanel
after that reboot your server
try report here
i hope i can help you
im not sysadmin
im not developer
i just try help based on what i know.

ma
malwarepeter #23

this works 100% change group of public_html to nogroup

example


chown Yourusername:nogroup  /home/domain.com/public_html/
MK
Mirza Khadnezar S [sick] #24

yes
but why the normal installation make this glitch ?

lu
luis #25

first how can i check if the folder has the wrong permissions, or group, then how can i make the changes im the main root user. can you add the commands please

Sa
Sangram #28

Hi were you able to resolve this? I have the same problem. The thread has been hijacked to a different issue. Anyway, in my case it is a index.html file only. But getting the same error.

SD
SaJeTek Developer #29

In Centos 7, I once had a similar issue with developers that when they upload files via FTP, the site was giving 404, in that case, they were uploading the public_html folder which was setting the user:group to YourUsername:YourUsername, the user:group on the public_html folder should be YourUsername:nobody.

So the following should fix the issue:

chown YourUsername:nobody /home/domain.com/public_html/

As to what caused it on a fresh setup, I haven’t checked on it.

Sa
Sangram #30

What will replace YourUsername

I tried this, but nothing really happened.

SD
SaJeTek Developer #31

First go to file manager and click “Fix Permissions”
Then from SSH run the following command.

ls -la /home/domain/public_html

Refer to the image in the first post of this topic, you will see in his first image for the index.html you see hagoa7132 hagoa7132, that is equivalent to YourUsername:YourUserGroup.
So in his example “YourUsername” is hagoa7132.

When you run the command, you will get YourUsername, use that in the command:

chown YourUsername:nobody /home/domain.com/public_html/
Sa
Sangram #32

Understood thanks! This isn’t working for me. Shall check other issues.

Mi
Michael #34

@redzoua thank you, this fixed it for me also.
I had copied 4 wordpress sites over to cyberpanel in exactly the same way. The first three worked perfectly then, despite the same process the fourth didn’t and I got the 404 error.

Ma
Matteo #35

I have the same problem. I’ve done everything, but it still doesn’t work. I use Cloudflare with CyberPanel and openlitespeed web server. The problem occurs as a result of a migration from one openlitespeed web server to another openlitespeed webserver always on the same server, so there are not even different parameters because the server is the same.

Sign in to reply