Configuring apache2 to different ports

genti@flossk:~$ sudo nano /etc/apache2/ports.conf
sudo: unable to resolve host flossk
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

#NameVirtualHost *:2020 [CHANGE THIS PORT]
Listen 2020 [CHANGE THIS PORT]

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here

Next file

genti@flossk:~$ sudo nano /etc/apache2/sites-enabled/000-default
sudo: unable to resolve host flossk
<VirtualHost *:2020> [CHANGE THIS PORT]
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ “/usr/share/doc/”
<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from ::1/128



About ardian
I'm a young free/libre open source software/linux, enthusiast who has been working on promoting FLOSS in Kosovo. I'm helping my fellow peopel here in Kosovo in learning GNU/Linux. I helped run the first SFK09(Software Freedom Kosova 09) conference. I organised and talked in many locations in my country. I also have been learning and working on the OpenStreetMap project for Kosovo. I'm working on translating different software packages into Albanian.

One Response to Configuring apache2 to different ports

  1. der@nged says:

    Your awesome, this solution works, I just hope you would make your posts more clear, thanks!!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: