Skip to main content

Posts

Showing posts from July, 2008

My develop site

Setting page: http://localhost:8888/MAMP/ Install phpmyadmin: I removed phpmyadmin with Code: sudo apt-get remove phpmyadmin then installed it again with Code: sudo apt-get install phpmyadmin This time I pressed space to select the apache2 option.. Run the following command and you'll have a folder called "phpmyadmin" in your localhost. Code: sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin Now you can access phpMyAdmin at http://localhost/phpmyadmin/

Create security on your web server

Specification Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch Step to create: 1. create file .htaccess into the folder you need to protect. Example: AuthType Basic AuthUserFile /var/www/mysite/.htpasswd AuthName "Authorization Required" AuthGroupFile /dev/null Require valid-user RewriteEngine on AuthType Basic AuthUserFile /var/www/mysite/.htpasswd AuthGroupFile /dev/null Require user [username] RewriteEngine on 2. create file .htpasswd htpasswd -cm /var/www/mysite/.htpasswd The -c will initially create the file. The -m will md5 encrypt the passwords for additional security. The htpasswd command will prompt you for a password. Be careful not to use the -c option when adding additional users as this will recreate the file and overwrite previous entries. Troubleshoot 1. If there is nothing coming up when you access web, make sure that 1.1 Enable use of apache htaccess file => EnablingUseOfApacheHtaccessFiles 1.2 Check in error.log - you might see that serve