User Tools

Site Tools


freebsd_apache

This is an old revision of the document!


Apache

pkg install apache24 ap24-mod_mpm_itk ap24-mod_security mod_php81 php81
vim /path/apache24/httpd.conf
Uncomment what you need I uncomment almost all extras

I also edit most default to use more secure defaults such as Prod
and I always have userdir enabled.
One important note about php

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>
<IfModule mpm_itk_module>
    AssignUserId chris chris
</IfModule>

itk is awesome as it allows you to not have to worry about perms, and PHP apps not working right. as the server runs the files as the user listed. This is also more secure as the files are normally chown'ed to a user rather root.

PHP is a horrible language but it runs 80% of the interwebs so we are stuck using it, messing with it.

freebsd_apache.1691332598.txt.gz · Last modified: (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki