Gideon So Posted July 26, 2017 Share Posted July 26, 2017 Hi, I have a addon domain in hostgator but can't make the site work cause all js files and css files are block and show 403 forbidden error. I check the error log there is many lines like this: Permission denied: /path/to/public_html/add-on-domain/site/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable. I wonder why the web server search for the .htaccess file in the site directory. Any hints are welcome Gideon Link to comment Share on other sites More sharing options...
szabesz Posted July 26, 2017 Share Posted July 26, 2017 Hi, I guess you have permission issues. In my cPanel blog post I show my own setup, you might be interested in it. 3 Link to comment Share on other sites More sharing options...
Gideon So Posted July 27, 2017 Author Share Posted July 27, 2017 Hi @szabesz, Thanks for your reply. Your post is about how to install processwire into sub-directory as the main domain. But I am trying to install it into a sub-directory as a addon domain. Is there any difference? I followed your post and seems that all css and js files are still blocked. Gideon Link to comment Share on other sites More sharing options...
szabesz Posted July 27, 2017 Share Posted July 27, 2017 (edited) 6 hours ago, Gideon So said: But I am trying to install it into a sub-directory as a addon domain. Is there any difference? Sure, you are right, there is and in my post I just briefly mention how to deal with addon domains because in my experience they are easier to manage since if one uses cPanel's "Create an Addon Domain" feature then by default the domain server will point to the given document root directory and all is setup well. At least in a properly configured cPanel account of course. So I really never had issues with addon domains. That is why my blogpost is mostly about how websites of addon domains and the website of the main domain can live happily together side-by-side in subdirs of public_htm/www. Regarding your issue, is seems to me that your files and directories do not have the permission/owner settings your server requires. Did you check those? EDIT: probably this is the most extensive guide we have in the docs: https://processwire.com/docs/security/file-permissions/ Edited July 27, 2017 by szabesz typos + EDIT 1 Link to comment Share on other sites More sharing options...
Gideon So Posted July 27, 2017 Author Share Posted July 27, 2017 Hi @szabesz, All the file permission is fine. The only thing I find in the log is this line:Permission denied: /path/to/public_html/add-on-domain/site/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable. It is strange that the web server looks for .htaccess file in the site/ directory. Gideon 1 Link to comment Share on other sites More sharing options...
szabesz Posted July 27, 2017 Share Posted July 27, 2017 Hi @Gideon So You might want to ask Hostgator's support since this issue is probably server related. As for .htaccess, I have no idea what the source of the error message can be, but apache should look for .htaccess in each directory or else how could it interpret them? Sure enough, if you have no such file there, then it is strange to see such a message. Link to comment Share on other sites More sharing options...
Gideon So Posted July 27, 2017 Author Share Posted July 27, 2017 Hi @szabesz, Will get them and see what is the problem. Thanks for your help anyway. Gideon 1 Link to comment Share on other sites More sharing options...
Gideon So Posted July 27, 2017 Author Share Posted July 27, 2017 Hi @szabesz, After some more research and investigation. You are right. It is directory permission problem. I though it is suphp'ed but it isn't. And I didn't set the templates directory and assets directory to 755. Therefore no css files and js files served. After made the permission right the site runs fine. Gideon 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now