Installer Ubuntu Serveur Web


The following commands install Apache support for server-side scripting in PHP, Ruby, Python, and Perl. Support for these languages is optional based on your server environment. To install: Perl support: sudo apt-get install libapache2-mod-perl2. Delonghi Pinguino C21 Manually. Abitha Death Photos. Python support. Arredocad Professional Letter. In this article, I’m going to be outlining the steps to install and configure a complete web server on a base install of Ubuntu 14.04 LTS server edition.
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our guide. Before You Begin • Ensure that you have followed the and guides, and the Linode’s. To check your hostname run: hostname hostname -f The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).
• Update your system: sudo apt-get update && sudo apt-get upgrade Install Apache • Install Apache 2.4, its documentation, and a collection of utilities: sudo apt-get install apache2 apache2-doc apache2-utils • Edit the main Apache configuration file and turn off the KeepAlive setting: /etc/apache2/apache2.conf. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of requests a server process serves StartServers 4 MinSpareServers 20 MaxSpareServers 40 MaxRequestWorkers 200 MaxConnectionsPerChild 4500 • On Ubuntu 14.04, the event module is enabled by default. Disable it, and enable the prefork module: sudo a2dismod mpm_event sudo a2enmod mpm_prefork • Restart Apache: sudo service apache2 restart The Event Module If you choose to keep the event module enabled, these settings are suggested for a 2GB Linode. • Open /etc/apache2/mods-available/mpm_event.conf in your text editor and edit the values as needed: /etc/apache2/mods-available/mpm_event.conf. 1 2 Options ExecCGI AddHandler cgi-script.pl • Create directories for your websites and websites’ logs, replacing example.com with your own domain information: sudo mkdir -p /var/www/example.com/public_html sudo mkdir /var/www/example.com/logs • Enable the site: sudo a2ensite example.com.conf • Restart Apache: sudo service apache2 restart Apache Mods and Scripting Install Apache Modules One of Apache’s strengths is its ability to be customized with modules.
The default installation directory for Apache modules is the /etc/apache2/mods-available/ directory. • List available Apache modules: sudo apt-cache search libapache2* • Install any desired modules: sudo apt-get install [module-name] • All mods are located in the /etc/apache2/mods-avaiable directory. Edit the.conf file of any installed module if needed, then enable the module: sudo a2enmod [module-name] To disable a module that is currently enabled: a2dismod [module-name] Optional: Install Support for Scripting The following commands install Apache support for server-side scripting in PHP, Ruby, Python, and Perl.