{"id":914,"date":"2015-02-25T09:23:34","date_gmt":"2015-02-25T02:23:34","guid":{"rendered":"http:\/\/oktobrima.staff.fe.uns.ac.id\/?p=914"},"modified":"2015-02-25T09:23:34","modified_gmt":"2015-02-25T02:23:34","slug":"apache-di-ubuntu-1204","status":"publish","type":"post","link":"https:\/\/angga.feb.uns.ac.id\/?p=914","title":{"rendered":"Apache di ubuntu 12:04"},"content":{"rendered":"<h1 class=\"doc-title\">Apache 2 Web Server on Ubuntu 12.04 LTS (Precise Pangolin)<\/h1>\n<p class=\"doc-time doc-modified-time\">Updated\u00a0Friday, January 10th, 2014\u00a0by Linode<\/p>\n<p>This tutorial explains how to install and configure the Apache web server on Ubuntu 12.04 (Precise Pangolin). All configuration will be done through the terminal; make sure you are logged in as root via SSH. If you have not followed the\u00a0<a href=\"https:\/\/www.linode.com\/docs\/getting-started\/\">getting started<\/a> guide, it is recommended that you do so prior to beginning this guide. Also note that if you\u2019re looking to install a full LAMP stack, you may want to consider using our\u00a0<a href=\"https:\/\/www.linode.com\/docs\/lamp-guides\">LAMP guides<\/a>.<\/p>\n<h2>Set the Hostname<\/h2>\n<p>Before you begin installing and configuring the components described in this guide, please make sure you\u2019ve followed our instructions for\u00a0<a href=\"https:\/\/www.linode.com\/docs\/getting-started#sph_setting-the-hostname\">setting your hostname<\/a>. Issue the following commands to make sure it is set properly:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1\n2<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>hostname\nhostname -f<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).<\/p>\n<h2>Install Apache 2<\/h2>\n<p>Make sure your package repositories and installed programs are up to date by issuing the following commands:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1\n2<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get update\napt-get upgrade --show-upgraded<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Enter the following command to install the Apache 2 web server, its documentation and a collection of utilities.<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install apache2 apache2-doc apache2-utils<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Edit the main Apache configuration file to adjust the resource use settings. The settings shown below are a good starting point for a\u00a0<strong>Linode 1GB<\/strong>.<\/p>\n<dl>\n<dt>\/etc\/apache2\/apache2.conf<\/dt>\n<dd>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>KeepAlive Off\n\n...\n\n&lt;IfModule mpm_prefork_module&gt;\nStartServers 2\nMinSpareServers 6\nMaxSpareServers 12\nMaxClients 80\nMaxRequestsPerChild 3000\n&lt;\/IfModule&gt;<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h2>Install Support for Scripting<\/h2>\n<p>The following commands are optional, and should be run if you want to have support within Apache for server-side scripting in PHP, Ruby, Python, or Perl.<\/p>\n<p>To install Ruby support, issue the following command:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install libapache2-mod-ruby<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>To install Perl support, issue the following command:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install libapache2-mod-perl2<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>To install Python support, issue the following command:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install libapache2-mod-python<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If you need support for MySQL in Python, you will also need to install Python MySQL support:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install python-mysqldb<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Your PHP application may require additional dependencies included in Ubuntu. To check for available PHP dependencies run\u00a0<code>apt-cache search php<\/code>, which will provide a list of package names and descriptions. To install, issue the following command:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install libapache2-mod-php5 php5 php-pear php5-xcache<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Issue the following command to install the\u00a0<code>php5-suhosin<\/code> package, which provides additional security to your PHP installation:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install php5-suhosin<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If you\u2019re also hoping to run PHP with MySQL, then also install MySQL support:<\/p>\n<div class=\"highlight plaintext\">\n<table border=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter gl\">\n<pre>1<\/pre>\n<\/td>\n<td class=\"code\">\n<pre>apt-get install php5-mysql<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache 2 Web Server on Ubuntu 12.04 LTS (Precise Pangolin) Updated\u00a0Friday, January 10th, 2014\u00a0by Linode This tutorial explains how to install and configure the Apache web server on Ubuntu 12.04 (Precise Pangolin). All configuration will be done through the terminal; make sure you are logged in as root via SSH. If you have not followed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-914","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts\/914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=914"}],"version-history":[{"count":0,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts\/914\/revisions"}],"wp:attachment":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}