Results 1 to 2 of 2

Thread: Apache2.conf

  1. #1

    Apache2.conf

    Can anybody point me to a sample apache2.conf file with the correct directives for using php and python? I'm running php8.1 and the current versions of Kali and python.

  2. #2
    Join Date
    2021-May
    Location
    UK
    Posts
    772
    You need to allow the correct module to run, and set it up, for example for PHP..

    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
    SetHandler application/x-httpd-php
    </FilesMatch>

    <Directory /usr/local/var/www/>
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME}!-f
    RewriteCond %{REQUEST_FILENAME}!-d
    RewriteRule ^(.*)$index.php?q=$1 [L,QSA]
    </Directory>


    You need to set up the correct file paths of course, according to your system or preferences thats from my set up on Mac OSX, but that should give you some idea..

Similar Threads

  1. Replies: 0
    Last Post: 2022-01-20, 00:57
  2. Use Apache2 instead of nginx
    By Th0rz in forum General Archive
    Replies: 2
    Last Post: 2016-01-13, 18:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •