# how to make phpmyadmin work with apache24?



## mountain (Aug 13, 2014)

Hi:
I'm running a fresh new binary pkg installed apache24, php, mariadb test server with phpmyadmin, but the phpmyadmin won't be loaded. While keep searching in the forum I found a post http://forums.freebsd.org/viewtopic.php?f=43&t=45920&hilit=phpmyadmin, it seems a solution said at the end that in directory /usr/local/www/phpMyAdmin/, make the file config.sample.inc.php overwrite on config.inc.php will work, but it's not in my case. http://127.0.0.1/phpmyadmn/ just displays 
	
	



```
The requested URL /phpmyadmn/ was not found..
```
 message.


----------



## SirDice (Aug 13, 2014)

mountain said:
			
		

> http://127.0.0.1/phpmyadmn/ just displays "The requested URL /phpmyadmn/ was not found.." message.


Your Apache isn't configured correctly.


----------



## mountain (Aug 13, 2014)

Keep googling I found the answer, adding next settings at the end of /usr/local/etc/apache24/httpd.conf


```
<FilesMatch "\.php$">
	SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
	SetHandler application/x-httpd-php-source
</FilesMatch>
	 
Alias /phpmyadmin "/usr/local/www/phpMyAdmin"
	 
<Directory "/usr/local/www/phpMyAdmin">
	Options None
	AllowOverride None
	Require all granted
</Directory>
```

All done! :e


----------



## SirDice (Aug 13, 2014)

I would suggest not editing httpd.conf too much. Create a file in /usr/local/etc/apache22/Includes/, named phpmyadmin.conf or something similar and put your additions in there. At the end of httpd.conf is an include statement that will include all the files in the Include directory. This will help keep things organized.


----------

