Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I run Django and PHP together on one Apache server?
    primarykey
    data
    text
    <p>I can currently run either Django through mod_wsgi or PHP on my Apache server.</p> <p>My Django projects run at: <a href="http://localhost" rel="noreferrer">http://localhost</a> and source is at C:/django_proj</p> <p>My PHP projects run at: <a href="http://php.localhost" rel="noreferrer">http://php.localhost</a> and source is at C:/web</p> <p>If I turn both on, php.localhost and localhost go to the Django project. I've already set them up through Apache virtual hosts.</p> <p>Here are some relevant lines in httpd.conf:</p> <pre><code>DocumentRoot "C:/web" &lt;Directory /&gt; Options FollowSymLinks AllowOverride None Order deny,allow Deny from all &lt;/Directory&gt; &lt;Directory "C:/web"&gt; Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all &lt;/Directory&gt; &lt;Directory "C:/django_proj"&gt; Order allow,deny Allow from all &lt;/Directory&gt; Include "C:/django_proj/apache/apache_django_wsgi.conf" </code></pre> <p>The relevant lines in <code>apache_django_wsgi.conf</code> is:</p> <pre><code>WSGIScriptAlias / "C:/django_proj/apache/proj.wsgi" &lt;Directory "C:/django_proj/apache"&gt; Order allow,deny Allow from all &lt;/Directory&gt; </code></pre> <p>Inside httpd-vhosts.conf:</p> <pre><code>&lt;Directory C:/web&gt; Order Deny,Allow Allow from all &lt;/Directory&gt; &lt;Directory C:/django_proj&gt; Order Deny,Allow Allow from all &lt;/Directory&gt; &lt;VirtualHost *:80&gt; DocumentRoot "C:/django_proj" ServerName localhost &lt;/VirtualHost&gt; &lt;VirtualHost *:80&gt; DocumentRoot "C:/web" ServerName php.localhost &lt;/VirtualHost&gt; </code></pre> <p>My PHP project is current inaccessible. Does anyone have any ideas what I'm missing?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload