Created
August 13, 2022 12:28
-
-
Save furenku/a922da703cf9737ad281089806642088 to your computer and use it in GitHub Desktop.
phpmyadmin apache conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Alias /phpmyadmin /usr/share/phpmyadmin | |
| <Directory /usr/share/phpmyadmin> | |
| Options SymLinksIfOwnerMatch | |
| DirectoryIndex index.php | |
| <IfModule mod_php5.c> | |
| <IfModule mod_mime.c> | |
| AddType application/x-httpd-php .php | |
| </IfModule> | |
| <FilesMatch ".+\.php$"> | |
| SetHandler application/x-httpd-php | |
| </FilesMatch> | |
| php_value include_path . | |
| php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp | |
| php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/ | |
| php_admin_value mbstring.func_overload 0 | |
| </IfModule> | |
| <IfModule mod_php.c> | |
| <IfModule mod_mime.c> | |
| AddType application/x-httpd-php .php | |
| </IfModule> | |
| <FilesMatch ".+\.php$"> | |
| SetHandler application/x-httpd-php | |
| </FilesMatch> | |
| php_value include_path . | |
| php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp | |
| php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/ | |
| php_admin_value mbstring.func_overload 0 | |
| </IfModule> | |
| </Directory> | |
| # Authorize for setup | |
| <Directory /usr/share/phpmyadmin/setup> | |
| <IfModule mod_authz_core.c> | |
| <IfModule mod_authn_file.c> | |
| AuthType Basic | |
| AuthName "phpMyAdmin Setup" | |
| AuthUserFile /etc/phpmyadmin/htpasswd.setup | |
| </IfModule> | |
| Require valid-user | |
| </IfModule> | |
| </Directory> | |
| # Disallow web access to directories that don't need it | |
| <Directory /usr/share/phpmyadmin/templates> | |
| Require all denied | |
| </Directory> | |
| <Directory /usr/share/phpmyadmin/libraries> | |
| Require all denied | |
| </Directory> | |
| <Directory /usr/share/phpmyadmin/setup/lib> | |
| Require all denied | |
| </Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment