[Resolved] 404 on all new websites

Status
Not open for further replies.

bloom360

Active Member
#1
Hi,

I am running LS on a WHM server. Everything had been running OK until I tried MOD SECURITY (through Easy Apache) and then disabled it again. Now, all existing websites continue to run just fine but new accounts give a 404 for files that are definitely there.

I have switched to Apache to confirm and everything works well. As soon as I switch to Litespeed, the same URLs that just worked a moment ago, return a 404.

The LS log says:

Code:
2015-06-02 22:31:22.697    ERROR    [HTAccess] Failed to open [/home/testusr/public_html/.htaccess]: Permission denied
2015-06-02 22:31:22.697    INFO    [14.203.218.10:55277-0#APVH_testusr.com.au] File not found [/home/testusr/public_html/whoami.txt]
2015-06-02 22:31:22.697    INFO    [14.203.218.10:55277-0#APVH_testusr.com.au] File not found [/home/testusr/public_html/404.shtml]
I tried:

Code:
# ls -al /home/testusr/www/.htaccess
-rw-r--r-- 1 testusr testusr 1770 Jun  1 11:03 /home/testusr/www/.htaccess
Any ideas what could be wrong?
 

mistwang

LiteSpeed Staff
#4
If you use Apache with mod_ruid2 or mod_itk, you may need to run
/scripts/disablefileprotect,

or, you can run easyApache again without mod_ruid2 or mod_itk enabled.
 

bloom360

Active Member
#5
I have chgrp'd "public_html" to "nobody" and all works well now.

However, creating new accounts continues to do the same. I have run Easy Apache without File Protect and without Mod Ruid2 and still the same problem. My LS plugin is 4.2.23 is it not supposed to do this automatically when enabling LS server?

Any idea how to fix this? It is obviously not viable to have to manual chgrp all new accounts.

Many thanks
 

bloom360

Active Member
#7
But shouldn't this be unnecessary after disabling it in Easy apache and rebuilding PHP?

Isn't the main problem that the LS plugin is not switching the config?
 

bloom360

Active Member
#9
# touch /var/cpanel/fileprotect

Seems to have fixed it.

Although I am not sure if this will be an issue on future Easy Apache rebuilds or if it means something else may be broken? What happens if I rebuild Apache with Mod RUID2 and File Protect, just to have a safe build for when we re-enable it? Does it conflict to have those settings when LS is running?
 

mistwang

LiteSpeed Staff
#10
Maybe you can run easyApache with "File Protect" checked. only the combination of ruid2 + file protect causes trouble.
If still have problem, you should open a ticket with cPanel regarding this.
 

bloom360

Active Member
#11
OK will try.

After rebuilding Apache, do I have to manually re build LS PHP or restart it? (I am using the cpanel plugin) I did try those things manually when testing this issue but they didn't seem to make any difference, but just asking anyway...
 

bloom360

Active Member
#13
All seems OK now.

I just rebuilt with File Protect and without Mod ruid2 and it works OK.

Just a question, having done the # touch /var/cpanel/fileprotect does it mean that if I switch to Apache, Fileprotect will not be enabled, even if Easy Apache believes it is?
 

NiteWave

Administrator
#14
I guess
#touch /var/cpanel/fileprotect
mean enable fileprotect.

it's best to ask cPanel about this question. if you get the reply, welcome to share back.
 
Status
Not open for further replies.
Top