Δημοσιεύτηκε: 15 Νοέμ 2008, 17:06
από thodoris_turtle
http://www.imageshack.gr/view.php?file= ... 1fi6sz.png

edit:

Το αρχειο mysite εινα το εχω κανει ως εξης:

Κώδικας: Επιλογή όλων

NameVirtualHost *:80
<VirtualHost *:80>

ServerAdmin localhost@localhost



DocumentRoot /home/teo/public_html/

<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>

<Directory /home/teo/public_html/>

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 /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

ServerSignature On



Alias /doc/ "/usr/share/doc/"

<Directory "/usr/share/doc/">

Options Indexes MultiViews FollowSymLinks

AllowOverride None

Order deny,allow

Deny from all

Allow from 127.0.0.0/255.0.0.0 ::1/128

</Directory>



</VirtualHost>

RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/webmail(.*)$ https://%{SERVER_NAME}/webmail$1 [L,R]
RewriteLog "/var/log/apache2/rewrite.log"



Το αρχειο SSL:

Κώδικας: Επιλογή όλων

NameVirtualHost *:443
<VirtualHost *:443>

ServerAdmin localhost@localhost



[color=#0000FF]SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem[/color]

DocumentRoot /home/teo/public_html/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/teo/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</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 /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
ServerSignature On

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

</VirtualHost>


αυτα τα δυο αρχειο ειναι στο pah /etc/apache2/sites-enabled

και το αρχειο default που ειναι στο path /etc/apache2/sites-available

το εχω κανει ως εξης:

Κώδικας: Επιλογή όλων

NameVirtualHost *:80
<VirtualHost *:80>

ServerAdmin localhost@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 /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

ServerSignature On



Alias /doc/ "/usr/share/doc/"

<Directory "/usr/share/doc/">

Options Indexes MultiViews FollowSymLinks

AllowOverride None

Order deny,allow

Deny from all

Allow from 127.0.0.0/255.0.0.0 ::1/128

</Directory>



</VirtualHost>

RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/webmail(.*)$ https://%{SERVER_NAME}/webmail$1 [L,R]
RewriteLog "/var/log/apache2/rewrite.log"



ειναι σωστα γιατι τωρα μετα την τροποποιηση των αρχειων που εκανα οταν πληκτρολογο http://localhost/
ή https://localhost ο apache δεν λειτουργει , ενω πριν λειτουργουσε μονο με http://localhost και οχι με https://localhost

Πριν κανω τις τροποποιησεις και οταν ειχα σαν documentroot το /home/teo/public ολα ηταν μια χαρα τουλαχιστον οταν πληκτρολογουσα http://localhost, ενω τωρα μετα τις τροποποιησεις και οταν το documentroot ειναι το /home/teo/public_html δεν δουλευει τιποτα :lol: