Jump to content

Ocs-server/Install/Configuring a webserver as host: Difference between revisions

From KDE Community Wiki
Snizzo (talk | contribs)
Created page with "== Target system == This guide is inteded to use with Ubuntu and may use Ubuntu only commands. It can be adapted to other distros however. If you want to help adding support f..."
 
Snizzo (talk | contribs)
Line 3: Line 3:


== Install distribution packages ==
== Install distribution packages ==
:Todo
Ubuntu:
<syntaxhighlight lang="cpp">
sudo apt-get install libapache2-mod-php5 mysql-server php5-mysql phpmyadmin
</syntaxhighlight>
 
== Enable URL rewriting ==
Ubuntu:
<syntaxhighlight lang="php">
sudo a2enmod rewrite
</syntaxhighlight>
 
Now open your server configuration file with your preferred text editor:
<syntaxhighlight lang="php">
sudo nano /etc/apache2/apache2.conf
</syntaxhighlight>
Now change those line of code when Directory is / or /var/www:
<syntaxhighlight lang="php">
AllowOverride None
</syntaxhighlight>
with:
<syntaxhighlight lang="php">
AllowOverride All
</syntaxhighlight>
And restart your web server:
<syntaxhighlight lang="php">
sudo service apache2 restart
</syntaxhighlight>
 
== Final result ==
Now you can check your server is now working at [http://localhost/]. You are ready to follow the next tutorial.

Revision as of 20:52, 6 May 2015

Target system

This guide is inteded to use with Ubuntu and may use Ubuntu only commands. It can be adapted to other distros however. If you want to help adding support for other distributions please feel free to edit this page.

Install distribution packages

Ubuntu:

sudo apt-get install libapache2-mod-php5 mysql-server php5-mysql phpmyadmin

Enable URL rewriting

Ubuntu:

sudo a2enmod rewrite

Now open your server configuration file with your preferred text editor:

sudo nano /etc/apache2/apache2.conf

Now change those line of code when Directory is / or /var/www:

AllowOverride None

with:

AllowOverride All

And restart your web server:

sudo service apache2 restart

Final result

Now you can check your server is now working at [1]. You are ready to follow the next tutorial.