Nie no dalej nie dziala , juz na serio niewiem co robie nie tak .
Napisze od poczatku do konca co i jak robie :
1.Instalacja apache
apt-get install apache2
2.Instaluje php5
apt-get install php5
3.apt-get update
4.W katalogu domowym towrze folder o nazwie www
mkdir /home/olaf/Documents/www
5.W edytorze bluefish tworze plik index.html o tresci:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>test strony</title>
<meta name="generator" content="Bluefish 2.2.3" />
<meta name="author" content="olaf" />
<meta name="date" content="2013-01-11T23:55:42+0000" />
<meta name="copyright" content=""/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<meta http-equiv="content-style-type" content="text/css"/>
<meta http-equiv="expires" content="0"/>
</head>
<body>
Strona testowa
</body>
</html>
Nastepnie przechodze do /etc/apache/sites-avaliable/ i modyfikuje plik default :
W oryginale:
VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Po modyfikacji:
<VirtualHost *:80>
ServerName oskarek
DocumentRoot /home/olafa/Documents/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/olafa/Documents/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
[/quote
Calosc zapisuje w osobnym pliku o nazwie oskarek
Po czym w konsoli wpisuje:
nano /etc/hosts i dodaje wpis
127.0.0.1 localhost
127.0.1.1 serwer
127.0.0.1 oskarek
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Zapisuje .
Kolejno a2ensite oskarek
restartuje apache potem restart systemu wbijam do przegladarki oskarek i nie mozna polaczyc wbijam ip i mam stronke z IT'S WORK wiec co robie nie tak?