LAMP on Linux 22.04 December 30, 2024
Antre du Tryphon
Search

LAMP on Linux 22.04

December 30, 2024 · admin Ubuntu Linux Debian MySQL PHP apache Database
This post contains notes to install Apache2, MySQL and PHP on a Ubuntu Server 22.04. This is not a tutorial but a checklist.

How to protect an Apache Website with a password

December 29, 2024 · admin Ubuntu Linux Debian apache
This blog post assumes that Apache is already installed.

Make an Apache2 SSL server more secure

June 3, 2015 · admin Unix Ubuntu Linux Debian apache
These easy steps will improve significantly the security of your Apache2 SSL server. Edit your /etc/apache2/mods-enabled/ssl.conf file and replace the SSLProtocol, SSLCipherSuite and SSLHonorCipherOrder parameters with the following values. SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA SSLHonorCipherOrder on SSLProtocol all -SSLv2 -SSLv3

Installing memcached to use it with php

Installing Memcached with php support in Ubuntu is a matter of a few steps: sudo apt-get install memcached php5-memcached sudo service apache2 restart You can test if memcached is active by running this command: echo "stats settings" | nc localhost 11211 You will end up with a response like this one: > STAT maxbytes 67108864 > STAT maxconns 1024 > STAT tcpport 11211 > STAT udpport 11211 > STAT inter 127.0.0.1 > ... > STAT item\_size\_max 1048576 > STAT maxconns\_fast no > STAT hashpower\_init 0 > STAT slab\_reassign no > STAT slab\_automove 0 > END

preinst: line 118: a2query: command not found

May 4, 2014 · admin Ubuntu apache Ubuntu 14.04
If you are getting the following errors while trying to install Apache on Trusty (Ubuntu 14.04), execute the commands below and try to re-install it. Preparing to unpack .../apache2_2.4.7-1ubuntu4_amd64.deb ... /var/lib/dpkg/tmp.ci/preinst: line 118: a2query: command not found dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb (--unpack): subprocess new pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) The commands to resolve this issue are: dpkg --fsys-tarfile /var/cache/apt/archives/apache2_2.4.7-1ubuntu4_amd64.deb | tar xOf - ./usr/sbin/a2query > /usr/sbin/a2query chmod 755 /usr/sbin/a2query Replace /var/cache/apt/archives/apache2\_2.4.7-1ubuntu4\_amd64.deb with the name of the file given in the error messages. Note that the first command is splitted on two lines in the above. So, copy both lines at once before pasting it in a terminal window.

How to change the maximum upload file size in PHP

April 28, 2014 · admin PHP apache
You can increase the maximum upload file size for only one application by creating a php.ini file in the directory where the file upload PHP script is. Add the following lines: ; Maximum allowed size for uploaded files. upload_max_filesize = 40M ; Must be greater than or equal to upload_max_filesize post_max_size = 40M It can also be changed system wide by editing the file /etc/php5/apache2/php.ini which is the global php.ini file. Modify the two lines listed above and restart apache.