Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm not really used to using plesk, but I am familiar with apache. I am trying to host a django site on a server that is hosting another website. The guy who set all this up is long gone... So I edited /var/www/vhosts/domainname.com/conf/vhost.conf and added a new location tag under one that is currently running. Then I reset plesk/apache with the following commands (none of the methods have any affect).

# /usr/local/psa/admin/sbin/websrvmng -a -v

# /etc/init.d/psa stop
# /etc/init.d/psa start

# /etc/init.d/httpd/stop
# /etc/init.d/httpd/start

None of these return any errors or warnings or anything! So to trouble shoot this decided to change the other location and see if it took root. Then I restarted plesk/httpd and once again, no visible changes occurred. The changes I made didn't affect anything. I'm at a loss on how to trouble shoot this so anything would help. Here's the code from vhost.conf although I doubt it is the problem:

#This was changed to "<Location /test/>" but the page still loaded on /pyrview
<Location /pyrview/> 
  AddHandler mod_python .py
  DirectoryIndex index.html index.py
  PythonHandler mod_python.publisher
  SetEnv MATPLOTLIBRC "/home/apache/.matplotlib"
  PythonPath "['/var/www/vhosts/domainname.org/httpdocs/pyrview/'] + sys.path"
  PythonDebug On
</Location>

#Here is the location I added
<Location /fish/>
  SetHandler python-program
  PythonHandler django.core.handlers.modpython
  SetEnv DJANGO_SETTINGS_MODULE fish.settings
  PythonDebug On
  PythonInterpreter fish
</Location>

<Location /fish/media>
  SetHandler None
</Location>
share|improve this question

2 Answers 2

You need to restart Apache on your server.

Likely, you'll want to run /sbin/apachectl graceful (or similar path).

share|improve this answer

You may need to run this before apachectl graceful:

/path/to/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=mt-example.com

I found this question looking for help with trying to get Django running with mod_wsgi. This site helped me: http://webmanufactory.blogspot.com/2009/06/last-post-about-mediatemple-dv-and.html

He also says to use service httpd graceful which is good if apachectl isn't there for some reason.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.