Jump to content

Recommended Posts

Posted (edited)

So, I have two .htaccess files.

1.) inside the ComicPub directory :

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(ComicPub/ComicPub/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ ComicPub/ComicPub/dispatch.wsgi/$1 [QSA,PT,L]



2.) Inside the .python_egg_cache :

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ ComicPub/ComicPub/dispatch.wsgi/$1 [QSA,PT,L]



My directory structure :

public_html
- ComicPub (directory)
- manage.py
- ComicPub (directory)
- .htaccess
- .settings.py


Which one should I be editing and is there any clear write-up regarding .htaccess file oh heliohost? Because this is a little confusing;.

Edited by saikoscs
Posted

Which one should I be editing and is there any clear write-up regarding .htaccess file oh heliohost? Because this is a little confusing;.

It is a little confusing. The .htaccess should go in /home/saikosns/public_html/ComicPub/.htaccess and it should look like this:

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(ComicPub/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ ComicPub/ComicPub/dispatch.wsgi/$1 [QSA,PT,L]
Does that work?
  • Like 1
Posted

Hey,

 

No, it still does not work. I'm not sure what's happening here. I checked my .htaccess. I guess you already made the changes in it because it was at the place you mentioned and had the same content.

Posted

Yep, your .htaccess file is in the right spot, and looks good now.

 

The next problem I found is in your dispatch.wsgi file. It doesn't have the correct path. It should look like this

sys.path.append("/home/saikosns/public_html/ComicPub")
Since your running your django app in a subdirectory you need to specify that subdirectory in the path in order for it to find its modules.
Posted

Thanks! It worked. I put up the whole website and it's pointing to it just fine. But, it's not loading the CSS and even the admin area (after trying to log in) is giving 500 ERROR.

 

The website with the same structure works just fine on my localhost. I've changed the permissions of the directories to 777 like here.

 

Any idea why this might be happening?

Posted

I fixed the issue. Seems like I had to port the admin/css files as well separately. Now, I'm facing an issue where the website cannot write to the sqlit3 db file. Trying to 777 the public_html temporarily to see if that'll fix the write problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...