Strona 2 z 3

: 19 sierpnia 2014, 10:28
autor: pone13
Pokaż plik konfiguracji serwera po z nią jest coś nie tak
client denied by server configuration: /home/user/strona/

: 19 sierpnia 2014, 11:04
autor: nex
do /home/user 0755

nadałem 775 i dalej to samo.


000-default.conf
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com


ServerAdmin webmaster@localhost
DocumentRoot /var/www/html


# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


: 19 sierpnia 2014, 11:18
autor: mariaczi
Zmieniasz konfigurację w /etc/apache2/sites-available/default a podajesz konfigurację apache2.conf.
Obstawiam, że ten fragment z pliku apache2.conf

Kod: Zaznacz cały

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>
"jest przyczyną" braku strony.

Coś mi się wydaje, że zmieniasz na oślep, bez zrozumienia.

: 19 sierpnia 2014, 11:21
autor: pone13
Kolega mariaczi chyba rozwiązał twój problem...

: 19 sierpnia 2014, 11:22
autor: nex
Jak to ustawić poprawnie?
<Directory />
Options FollowSymLink
s AllowOverride None
Require all acces?
</Directory>
Strzelałem z tym acces :)

: 19 sierpnia 2014, 11:23
autor: mblazeji2
Może

Kod: Zaznacz cały

chmod -R 775 /home/user/strona

: 19 sierpnia 2014, 11:23
autor: pone13

Kod: Zaznacz cały

<Directory />      
      Options FollowSymLinks
      AllowOverride All
 #   Require all denied
</Directory>
Zakomentuj require all

: 19 sierpnia 2014, 11:27
autor: pone13
Treść /etc/apache2/sites-availablel000-default.conf

Kod: Zaznacz cały

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /home/user/strona/html


    <Directory /home/user/strona/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>


    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


    Include conf-available/serve-cgi-bin.conf
</VirtualHost>
potem restart serwera:

Kod: Zaznacz cały

# /etc/init.d/apache2 restart

: 19 sierpnia 2014, 11:31
autor: nex
/etc/apache2/apache2.conf
<Directory /> Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost
DocumentRoot /home/user/strona/html




<Directory /home/user/strona/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>




ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined




Include conf-available/serve-cgi-bin.conf
</VirtualHost>
przeglądarka
Forbidden

You don't have permission to access / on this server.
[HR][/HR]Apache/2.4.7 (Ubuntu) Server at 188.165.23.146 Port 80
Oczywiście był restart

: 19 sierpnia 2014, 11:41
autor: pone13
Ja jebi*** zakomentuj Require all denied !!!!!!!!


Serwer wystartuje z konta www-data grupa www-data (chyba że zmieniłeś ale wątpię).
Sprawdź uważnie uprawnienia do folderu /home/user/strona/html.