apache virtual host και port forwarding

...ρύθμιση - εγκατάσταση web server, mail server, ftp server, κλπ

Συντονιστές: the_eye, konnn

apache virtual host και port forwarding

Δημοσίευσηαπό paul555 » 30 Νοέμ 2010, 17:35

Καλησπέρα σε όλους. Μετά από πολύ καιρό προσπαθώ να ξαναστήσω τον apache με virtual host αλλά παίρνω ένα Access Denied error. Στον firefox εμφανίζεται αυτό
Κώδικας: Επιλογή όλων
Forbidden
You don't have permission to access / on this server.
Apache/2.2.16 (Ubuntu) Server at localhost Port 80


Το αρχείο του virtual host είναι το παρακάτω
Κώδικας: Επιλογή όλων
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.drupal-site.com
ServerAlias drupal-site.com

DocumentRoot /home/pavlos/Temp/websites/drupal-site/htdocs
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /home/pavlos/Temp/websites/drupal-site/htdocs/>
Options FollowSymLinks
AllowOverride all
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /home/pavlos/Temp/websites/drupal-site/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>


# Logfiles
ErrorLog /home/pavlos/Temp/websites/drupal-site/logs/error.log
CustomLog /home/pavlos/Temp/websites/drupal-site/logs/access.log combined

</VirtualHost>


Έχω ενεργοποιήσει το site με
Κώδικας: Επιλογή όλων
a2ensite pavlos.homelinux.org


Το αρχείο /etc/hosts είναι το παρακάτω
Κώδικας: Επιλογή όλων
192.168.1.112 pavlos-laptop # Added by NetworkManager
127.0.0.1 localhost.localdomain localhost joomla-site.com drupal-site.com
::1 pavlos-laptop localhost6.localdomain6 localhost6
127.0.1.1 pavlos-laptop

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Το error log του apache δείχνει αυτό
Κώδικας: Επιλογή όλων
[Tue Nov 30 16:19:06 2010] [crit] [client 127.0.0.1] (13)Permission denied: /home/pavlos/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable


Έχει κάποιος μια ιδέα;
Επίπεδο Γνώσεων: Linux: Χαμηλό / Προγραμματισμός: Όχι / Αγγλικά: Καλά
Ubuntu 11.10 64bit
HP Pavilion dv6-1310sv : T4300(2.1GHz, 1MB) / 2x4096MB / ATI Mobility Radeon HD 4530 / Broadcom Corporation BCM4312 802.11b/g Wireless / - / WDC HD /15.6" WXGA
Άβαταρ μέλους
paul555
babeTUX
babeTUX
 
Δημοσιεύσεις: 40
Εγγραφή: 03 Νοέμ 2008, 22:30
Εκτύπωση

Re: apache virtual host και port forwarding

Δημοσίευσηαπό machinakias » 01 Δεκ 2010, 18:27

unable to check htaccess file, ensure it is readable..........δεν σου λεει κατι αυτο; εχεις κλειδωσει την προσβαση με htaccess;
για δοκιμασε και κανρο εγγραψιμο...(λεω μια ιδεα...)

δες κι αυτο...

# Why do I get a "Forbidden" message whenever I try to access a particular directory?

This message is generally caused because either

* The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or
* The Apache configuration has some access restrictions in place which forbid access to the files.

You can determine which case applies to your situation by checking the error log.

In the case where file system permission are at fault, remember that not only must the directory and files in question be readable, but also all parent directories must be at least searchable (i.e., chmod +x /directory/path) by the web server in order for the content to be accessible.
# Why do I get a "Forbidden/You don't have permission to access / on this server" message whenever I try to access my server?

Search your conf/httpd.conf file for this exact string: <Files ~>. If you find it, that's your problem -- that particular <Files> container is malformed. Delete it or replace it with <Files ~ "^\.ht"> and restart your server and things should work as expected.

This error appears to be caused by a problem with the version of linuxconf distributed with Redhat 6.x. It may reappear if you use linuxconf again.
Αθηναϊκός Σύλλογος Φίλων και Χρηστών Λίνουξ: http://athlug.gr http://www.computersworld.gr
Γνώσεις ⇛ Linux: Ξέρω κάτι λίγα... ┃ Προγραμματισμός: Όχι ┃ Αγγλικά: Καλά ┃ Βέσπα: Ναι,Ξέρω απο...Βέσπα! ┃

Λειτουργικό ⇛ Ubuntu 9.04 32bit σε Aspire 1603LM
Προδιαγραφές ⇛ Intel Pentium 4 CPU 2.60GHz │ 1 GB │ ATI Radeon RV250 Mobility FireGL 9000 │ TFT 15.4"
Άβαταρ μέλους
machinakias
punkTUX
punkTUX
 
Δημοσιεύσεις: 175
Εγγραφή: 28 Αύγ 2008, 14:54
Τοποθεσία: Ζωγραφος, Αθηνα
Εκτύπωση

Re: apache virtual host και port forwarding

Δημοσίευσηαπό the_eye » 02 Δεκ 2010, 01:30

Έχεις πολλά λάθη
1. Για να hostάρεις 1 site δεν θες virtual host
2. ServerName www.drupal-site.com <- Δεν νομίζω αυτό να είναι το domain σου
3. pavlos.homelinux.org <- Αυτό το domain ποιον DNS το έχει και που αντιστοιχεί ;
4. To /etc/hosts δεν έχει καμία σχέση
5. /home/pavlos/.htaccess <- Αυτό το αρχείο δεν θα έπρεπε να ήταν εκεί.

Γενικά υπάρχει πολύ μπέρδεμα στην εγκατάστασή σου
Όσο λιγότερο κλειστό λογισμικό έχεις, τόσα λιγότερα προβλήματα.
1 Γνώσεις ⇛ Linux: Καλό ┃ Προγραμματισμός: Ναι PHP, MySQL ┃ Αγγλικά: Καλά
2 Ubuntu 24.04.2
3 Intel Core i5-6500 CPU @ 3.20GHz ‖ RAM 7836 MiB ‖ Gigabyte B150M-HD3 DDR3-CF - Gigabyte B150M-HD3 DDR3
4 Intel HD Graphics 530 [8086:1912] {i915}
5 enp1s0: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Άβαταρ μέλους
the_eye
Διαχειριστής
Διαχειριστής
 
Δημοσιεύσεις: 11719
Εγγραφή: 16 Μαρ 2010, 17:19
Launchpad: ntoulasd
IRC: the_eye_
Εκτύπωση

Re: apache virtual host και port forwarding

Δημοσίευσηαπό paul555 » 05 Δεκ 2010, 21:27

Ευχαριστώ για τις απαντήσεις. Το λάθος μου ήταν τα permissions που έπρεπε να είχε ο φάκελος
Κώδικας: Επιλογή όλων
/home/pavlos/Temp/websites/drupal-site/htdocs
και οι υποφακέλοι του. Για να διευκρινίσω αυτή είναι η πρώτη μου προσπάθεια να εγκαταστήσω τον apache και το Drupal. Σκέφτηκα να εγκαταστήσω δύο site με το Drupal ένα για δοκιμή και ένα για τελική χρήση. Για το domain χρησιμοποίησα το dyndns όπως διάβασα εδώ http://mexpolk.wordpress.com/2008/01/29/ubuntu-gutsy-dyndns-client-setup/ . Για το Drupal βρήκα αυτό HowTo: Configure your local workstation to serve multiple sites using Drupal's multisite configurations and Apache's VirtualHost και προς το παρών έχω φιάξει μόνο το πρώτο site για τη δοκιμή. Μπορεί κάποιος να μου εξηγήσει τα λάθη και πως να τα διορθώσω;
Επίπεδο Γνώσεων: Linux: Χαμηλό / Προγραμματισμός: Όχι / Αγγλικά: Καλά
Ubuntu 11.10 64bit
HP Pavilion dv6-1310sv : T4300(2.1GHz, 1MB) / 2x4096MB / ATI Mobility Radeon HD 4530 / Broadcom Corporation BCM4312 802.11b/g Wireless / - / WDC HD /15.6" WXGA
Άβαταρ μέλους
paul555
babeTUX
babeTUX
 
Δημοσιεύσεις: 40
Εγγραφή: 03 Νοέμ 2008, 22:30
Εκτύπωση


Επιστροφή στο Διακομιστές / Εξυπηρετητές