Re: files are downloadable in browser because of apache conf file! help!!!

2012-05-13 Thread doniyor
yeah, you are right, i realized this after having read the official docs 
with close focus for the 3rd time.. :) 

thanks thanks.. 




Am Sonntag, 13. Mai 2012 19:41:50 UTC+2 schrieb Jani Tiainen:
>
> You should deploy django files outside www directories. That way even 
> incorrect config shouldn't reveal any actual files.
>
> On Sat, May 12, 2012 at 8:20 AM, doniyor wrote:
>
>> hey guys, i was configuring my django project on server, in httpd.conf 
>> file. suddenly i have 500 Internal Server Error. before that i had the page 
>> where files can be just downloaded. how can i fix this? apache2.2 is 
>> running and mod_wsgi is installed. i think, i dont know how to tell apache 
>> about my mod_wsgi and djangoproject. What i now have is: 
>>
>> a folder 'apache' next to my django project folder. Apache folder has: 
>> apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, 
>> settings_production.py
>>
>> and in httpd.conf i have this (stahlhandel is my djangoproject): 
>>
>> http://85.114.145.142/>>
>> RewriteEngine On
>> RewriteLog  /usr/local/httpd/logs/**rewrite.log
>> RewriteLogLevel 2
>> RewriteMap  low int:tolower
>> RewriteMap  subdom  txt:/usr/local/httpd/conf/**
>> subdomains.lst
>> RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
>> RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
>> DocumentRoot /usr/local/httpd/htdocs/admin
>> Servername admin.afect.stahlbaron.de
>> 
>>
>> http://85.114.145.142/>>
>> ServerAdmin webmaster
>> Servername afect.stahlbaron.de
>> Serveralias www.afect.stahlbaron.de
>> DocumentRoot /usr/local/httpd/vhtdocs/**stahlbaron/stahlhandel
>> SuexecUserGroup stahlbaron stahlbaron
>> ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/**stahlbaron/cgi-bin/
>> WSGIScriptAlias / /www/vhtdocs/stahlbaron/**
>> stahlhandel/apache/lastsite.**wsgi
>> 
>> Options SymLinksIfOwnerMatch Indexes
>> AllowOverride AuthConfig
>> Allow from all
>> 
>>
>> 
>> Order deny,allow
>> Allow from all
>> 
>>
>>   ScriptAlias /php/ 
>> /usr/local/httpd/conf/php/stah**lbaron.de/
>>   AddHandler php-cgi .php
>>   Action php-cgi /php/php.cgi
>> # DocumentRoot /usr/local/httpd/htdocs/
>># Servername afect.stahlbaron.de
>> 
>>
>> can it be that i am missing  tag or is it here not relevant? 
>>
>> thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/xXizu5s--zcJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Jani Tiainen
>
> - Well planned is half done, and a half done has been sufficient before...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3RMj_-IhkWwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: files are downloadable in browser because of apache conf file! help!!!

2012-05-13 Thread Jani Tiainen
You should deploy django files outside www directories. That way even
incorrect config shouldn't reveal any actual files.

On Sat, May 12, 2012 at 8:20 AM, doniyor  wrote:

> hey guys, i was configuring my django project on server, in httpd.conf
> file. suddenly i have 500 Internal Server Error. before that i had the page
> where files can be just downloaded. how can i fix this? apache2.2 is
> running and mod_wsgi is installed. i think, i dont know how to tell apache
> about my mod_wsgi and djangoproject. What i now have is:
>
> a folder 'apache' next to my django project folder. Apache folder has:
> apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py,
> settings_production.py
>
> and in httpd.conf i have this (stahlhandel is my djangoproject):
>
> http://85.114.145.142/>>
> RewriteEngine On
> RewriteLog  /usr/local/httpd/logs/**rewrite.log
> RewriteLogLevel 2
> RewriteMap  low int:tolower
> RewriteMap  subdom  txt:/usr/local/httpd/conf/**subdomains.lst
> RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
> RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
> DocumentRoot /usr/local/httpd/htdocs/admin
> Servername admin.afect.stahlbaron.de
> 
>
> http://85.114.145.142/>>
> ServerAdmin webmaster
> Servername afect.stahlbaron.de
> Serveralias www.afect.stahlbaron.de
> DocumentRoot /usr/local/httpd/vhtdocs/**stahlbaron/stahlhandel
> SuexecUserGroup stahlbaron stahlbaron
> ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/**stahlbaron/cgi-bin/
> WSGIScriptAlias / /www/vhtdocs/stahlbaron/**
> stahlhandel/apache/lastsite.**wsgi
> 
> Options SymLinksIfOwnerMatch Indexes
> AllowOverride AuthConfig
> Allow from all
> 
>
> 
> Order deny,allow
> Allow from all
> 
>
>   ScriptAlias /php/ 
> /usr/local/httpd/conf/php/stah**lbaron.de/
>   AddHandler php-cgi .php
>   Action php-cgi /php/php.cgi
> # DocumentRoot /usr/local/httpd/htdocs/
># Servername afect.stahlbaron.de
> 
>
> can it be that i am missing  tag or is it here not relevant?
>
> thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/xXizu5s--zcJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



files are downloadable in browser because of apache conf file! help!!!

2012-05-11 Thread doniyor
hey guys, i was configuring my django project on server, in httpd.conf 
file. suddenly i have 500 Internal Server Error. before that i had the page 
where files can be just downloaded. how can i fix this? apache2.2 is 
running and mod_wsgi is installed. i think, i dont know how to tell apache 
about my mod_wsgi and djangoproject. What i now have is: 

a folder 'apache' next to my django project folder. Apache folder has: 
apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, 
settings_production.py

and in httpd.conf i have this (stahlhandel is my djangoproject): 

http://85.114.145.142/>>
RewriteEngine On
RewriteLog  /usr/local/httpd/logs/rewrite.log
RewriteLogLevel 2
RewriteMap  low int:tolower
RewriteMap  subdom  txt:/usr/local/httpd/conf/subdomains.lst
RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
DocumentRoot /usr/local/httpd/htdocs/admin
Servername admin.afect.stahlbaron.de


http://85.114.145.142/>>
ServerAdmin webmaster
Servername afect.stahlbaron.de
Serveralias www.afect.stahlbaron.de
DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/stahlhandel
SuexecUserGroup stahlbaron stahlbaron
ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/stahlbaron/cgi-bin/
WSGIScriptAlias / 
/www/vhtdocs/stahlbaron/stahlhandel/apache/lastsite.wsgi

Options SymLinksIfOwnerMatch Indexes
AllowOverride AuthConfig
Allow from all



Order deny,allow
Allow from all


  ScriptAlias /php/ /usr/local/httpd/conf/php/stahlbaron.de/
  AddHandler php-cgi .php
  Action php-cgi /php/php.cgi
# DocumentRoot /usr/local/httpd/htdocs/
   # Servername afect.stahlbaron.de


can it be that i am missing  tag or is it here not relevant? 

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/xXizu5s--zcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.