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

So I have trac running on my debian server with the VirtualHost file looking like:

...
WSGIScriptAlias / /srv/domain/trac.wsgi
WSGIScriptReloading On

<Directory /srv/domain/tracprojects>
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  Deny from all
</Directory>
...

I thought this might deny access to everyone (which I wanted to do to test that this would work). Unfortunatley this didn't affect the setup although the trac application still runs.

Is there something I need to put in my wsgi file to restrict access instead of in my virtual host file?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You should have used:

WSGIScriptAlias / /srv/domain/trac.wsgi

<Directory /srv/domain/>
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  Deny from all
</Directory>

That may stop other stuff as well below that directory though, so use instead:

WSGIScriptAlias / /srv/domain/trac.wsgi

<Directory /srv/domain/tracprojects>
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  <Files trac.wsgi>
  Deny from all
  </Files>
</Directory>

BTW, you don't need WSGIScriptReloading.

Also make sure you read:

Using daemon mode would be prefered.

General setup instructions for Trac at:

share|improve this answer
    
Hi thanks, sorry the WSGIScriptReloading was a throwback from my flask setup (I copied the virtualhost file...), anyway I've removed that now. –  ing0 Dec 22 '12 at 23:22
    
That worked though thanks :D –  ing0 Dec 22 '12 at 23:28
add comment

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.