Skip to content

Sysadmin papilusion phpmyadmin 11 01 2012

Yannouk edited this page Jul 5, 2012 · 1 revision

Session

  • user : root
  • host : papilusion.reverse.seizam.com
  • date : 11/01/12 09:30
  • curpath : /root

Commands

 [email protected]# cp /usr/share/doc/php-apc/apc.php.gz /root
 [email protected]# less /etc/apache2/conf.d/phpmyadmin.conf
 [email protected]# less /etc/apache2/sites-enabled/001-papilusion
 [email protected]# less /etc/apache2/conf.d/phpmyadmin.conf
 [email protected]# cp /etc/apache2/conf.d/phpmyadmin.conf /etc/apache2/sites-available/phpmyadmin
 [email protected]# ls -lsa /etc/apache2/sites-available/
 [email protected]# ls -lsa /etc/apache2/conf.d/
 [email protected]# rm /etc/apache2/conf.d/phpmyadmin.conf
 [email protected]# nano /etc/apache2/sites-available/phpmyadmin
 [email protected]# a2ensite
 [email protected]# /etc/init.d/apache2 reload

New file /etc/apache2/sites-available/phpmyadmin as follow

<VirtualHost *:80>

	ServerName  localhost

	Alias /phpmyadmin /usr/share/phpmyadmin

	<Directory /usr/share/phpmyadmin>
		Options FollowSymLinks
		DirectoryIndex index.php

		<IfModule mod_php5.c>
			AddType application/x-httpd-php .php

			php_flag magic_quotes_gpc Off
			php_flag track_vars On
			php_flag register_globals Off
			php_value include_path .
		</ifmodule>
	
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
	</directory>

	# Authorize for setup
	<Directory /usr/share/phpmyadmin/setup>
	    <IfModule mod_authn_file.c>
	    AuthType Basic
	    AuthName "phpMyAdmin Setup"
	    AuthUserFile /etc/phpmyadmin/htpasswd.setup
	    </ifmodule>
	    Require valid-user
	</directory>

	# Disallow web access to directories that don't need it
	<Directory /usr/share/phpmyadmin/libraries>
	    Order Deny,Allow
	    Deny from All
	</directory>
	<Directory /usr/share/phpmyadmin/setup/lib>
	    Order Deny,Allow
	    Deny from All
	</directory>

</virtualhost>
Clone this wiki locally