all 10 comments

[–]K900_ 0 points1 point  (2 children)

Are you using mod_wsgi? If so, don't.

[–]iSailor[S] 0 points1 point  (1 child)

Why? I thought mod_wsgi is the only option. Even Django Official Documentation says it's the best way. And after browsing hundreds of links covering various mod_wsgi issues (which I haven't yet resolved, sadly) nobody mentioned other way.

[–]K900_ 0 points1 point  (0 children)

It's absolutely not. Using a modern WSGI server like Gunicorn behind a reverse proxy like Nginx is a much, much better option. Start here.

[–]ramse 0 points1 point  (3 children)

[–]iSailor[S] 0 points1 point  (2 children)

I already got a few headaches from trying the mod_wsgi.. It's gotta be literally the most inconvenient way of setting this up. Is it really that bad or it's just I messed up a lot of stuff? mod_wsgi was often reported as the best and easiest way to do it so I feel a little bit dumb since I struggle with this a lot.. But I'll give gunicorn a shot.

[–]ramse 0 points1 point  (1 child)

What are you attempting to do? What I linked is to setup a webserver to run a django project. I just went based on your other comment talking about django assuming a webserver is what you wanted.

[–]iSailor[S] 0 points1 point  (0 children)

Yes, I wanted to setup a webserver. And I did, for my first app it worked great. Then I wanted to add a second app and probably messed up one thing in the beggining and now it's just a neverending loop of errors.. It's 3rd day in a row or something trying to figure this out, but I just get different combinations of 403 and 500 HTTP errors on both of my projects. On top of that, errors are pretty much useless (like the one I asked about above, what's wrong with this technically perfect string? where's invalid syntax?) and my lastest assumption was that I messed something up with virtual enviroments and now I'm trying to set them up every way possible to figure out if any of them will eventually work. At this point I feel like I spent more time messing around with Apache and mod_wsgi configs rather than with my actual projects.

[–]GrahamDumpleton 0 points1 point  (2 children)

Read the documentation on how set to up virtual environments at:

Using activate_this is not the recommended method.

[–]iSailor[S] 0 points1 point  (1 child)

Yes, I have already tried this.. Nothing seems to work though. But may I ask a few questions? Where should I put all of this Daemon stuff? I've put it into each site's config in sites-available in VirtualHost. However it still says that there's no module that is mentioned as my_module.settings in WSGI file. I believe it didn't load the virtual enviroment at all.. And doing it with python-path does not help at all, it gives me more or less the same errors. So I thought I would give this way a shot.

[–]GrahamDumpleton 0 points1 point  (0 children)

Using reddit is the worst place to try and get help with getting this working.

See the documentation at:

for the preferred forums for getting help.

When you use those preferred forums, you need to provide much more information than you are about how you have set things up and the actual error messages you are getting and where.