0

I have project in django on my server (wsgi, configured in apache)

I do not have access to config file, i have only django.wsgi file in my public_html folder.

And django works fine, but i wish in one of the public_html subdirectory place php script.

How to do it?

Luchian Grigore
  • 253,575
  • 64
  • 457
  • 625
Nips
  • 13,162
  • 23
  • 65
  • 103
  • 1
    since python will use the wsgi protocole, maybe you could use another protocole to use php, for example cgi? – Abdelouahab Sep 26 '11 at 11:34
  • 1
    @abdel - correct, use whatever plugin is normally used for php as the server will see the .php and run based on that. Make your comment an answer and get up votes :) – KevinDTimm Sep 26 '11 at 11:37
  • http://stackoverflow.com/questions/1020390/how-do-i-run-django-and-php-together-on-one-apache-server and http://www.scottgorlin.com/2009/07/embedding-django-in-php/ i think this can help? – Abdelouahab Sep 26 '11 at 11:48
  • I don't have access to virtual host file, only .htaccess (simple, only rewriterules) – Nips Sep 26 '11 at 11:51
  • am sorry, am not a php dev, but i've found this, and maybe this can help: "..Changes made to an existing .htaccess file will be seen immediately. When creating new .htaccess files or deleting existing .htaccess files, you might not see changes for up to an hour.." [the original link](http://help.godaddy.com/article/1082) maybe other one can provide better answer, sorry again :) – Abdelouahab Sep 26 '11 at 11:59

2 Answers2

2

since python will use the wsgi protocol, maybe you could use another protocol to use php, for example cgi ;) (thank you Kevin)

Abdelouahab
  • 7,331
  • 11
  • 52
  • 82
1

If you haven't got access to config, the someone must have added:

AddHandler wsgi-script .wsgi

to the main Apache config or you added it to your .htaccess file for your Django application to work.

All that is required is the appropriate AddHandler directive for .php extension files and PHP code should be able to be placed in the same directories without interference presuming Apache as a whole has PHP support enabled.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134