-
Search
Categories
-
Linux, PHP, LAMP, The Web in a blog- Android – how to develop directly on a phone
- Android drawable default icons – they are free to use
- Android how to read and write files
- Uncompress on the fly when copying a file from a remove location with scp
- Setting up an encrypted volume on an external hard drive on CentOS
- Linux bash – tar tricks
- Implement Selenium tests
- Using a downloaded package without IDE in Java
- CSS selectors optimisation
- Ubuntu Linux on Acer Aspire AO751h
Tag Cloud
alarm array backup begin button character commercial constants coppermine CSV DVD eclipse ecommerce email email server expect firefox font foreach formatting fstab ftp GMail gnome keyboard Lucene marketing memcached mount plugin profiling protect regexp scp Selenium SEO sftp split svn tar utf utf8 Vbulletin Virtual Server Web Dev Security
Category Archives: Apache
How to benchmark apache+php
This is to see whether you server is CPU-bound or RAM-bound. We have to stress it and see which one of those components gets saturated first. If that is the RAM, we can add easily more RAM. The amount of … Continue reading
Posted in Apache, PHP, System Administration
Leave a comment
Apache and mod_ssl – HTTPS
To check whether SSL is already loaded by your Apache: /usr/sbin/httpd -M If it is not, installed it. After installing it, you should see a file in /etc/httpd/conf.d and a corresponding LoadModule directive there or in the main Apache configuration … Continue reading
Posted in Apache
Leave a comment
Apache – Easy Benchmark
ab -n 1000 -c 5 http://mydomain.com/bench.htm makes 1000 separate requests for the same file with a concurrency (simultaneous requests) of 5
Posted in Apache, Benchmarch
Leave a comment
Apache – Create an Environment Variable to Use With PHP
Add this in your Apache configuration file: SetEnv ENVIRONMENT “dev” In this way, thanks to the SetEnv instruction, we have created some environment variables in Apache that can be used inside our PHP code. In our PHP script we can … Continue reading
Posted in Apache
Leave a comment
Secure PHP & Apache Configuration
PHP Disable error messages expose_php Off Check you can’t get info by doing telnet localhost 80 and then issueing: HEAD / HTTP/1.0 session.use_only_cookies = 1 allow_url_fopen Off [if you don’t really need the opposite] register_globals = Off magic_quotes_gpc = ??? … Continue reading
Posted in Apache, LAMP Server Setup, PHP, Security, Web Dev Security
Tagged Web Dev Security
Leave a comment
Auth: Protect A Site With Password
Add this in the Apache configuration file: <Directory document_root_for_the_site > AuthType Basic AuthName “Restricted access area” AuthUserFile path_to_passwords_file Require user username1 username2 </Directory> The Require user parameter could have a list of usernames space-separated. Usually path_to_passwords_file is /etc/httpd/passwords If you … Continue reading
Posted in Apache, Security
Leave a comment
Apache Virtual Host Setting
Don’t forget to uncomment the line: NameVirtualHost *:80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Check that DirectoryIndex directive contains: index.html index.htm index.php !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Typical setup for dev environment <VirtualHost *:80> DocumentRoot /var/www/html/example.com/dev/html ServerName dev.example.com <Directory /var/www/html/example.com/dev/html> AllowOverride All </Directory> AddDefaultCharset UTF-8 php_flag display_errors on php_flag … Continue reading
Posted in Apache
Leave a comment
Apache Tips
Checking the configuration file sintax before restarting the server: apachectl -t
Posted in Apache
Leave a comment
Htaccess File to Set register_globals Directive
Some hosting provider set register_globals to ON just for compatibility to old open source projects. In this case, you should be able to override that just putting this line in your .htaccess file: php_flag register_globals on
Posted in Apache, PHP
Leave a comment
