Portál AbcLinuxu, 5. května 2025 15:13

Dotaz: apache public_html

24.2.2019 13:51 Jack Hokus | skóre: 34 | blog: LostHeaven
apache public_html
Přečteno: 306×
Odpovědět | Admin
Ahoj,

mám nainstalovaný testovací server s apachem na Slackware. Chtěl bych si zprovoznit adresář public_html.

Když zadám http://localhost/~peter/

Tak se nepřipojím, kde může být chyba?

Seznam modulů
root@Slackware:/etc/httpd# httpd -M
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 185.8.164.21. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_event_module (shared)
 authn_file_module (shared)
 authn_core_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 authz_dbm_module (shared)
 authz_core_module (shared)
 access_compat_module (shared)
 auth_basic_module (shared)
 reqtimeout_module (shared)
 filter_module (shared)
 mime_module (shared)
 log_config_module (shared)
 env_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 version_module (shared)
 unixd_module (shared)
 status_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 userdir_module (shared)
 alias_module (shared)
root@Slackware:/etc/httpd#

Výpis s acces logu

185.220.101.70 - - [24/Feb/2019:05:25:37 +0000] "-" 408 -
95.82.19.226 - - [24/Feb/2019:05:34:25 +0000] "GET / HTTP/1.1" 200 201
187.74.48.235 - - [24/Feb/2019:06:00:14 +0000] "GET / HTTP/1.0" 200 201
95.47.51.160 - - [24/Feb/2019:06:10:14 +0000] "GET / HTTP/1.1" 200 201
89.190.245.30 - - [24/Feb/2019:08:14:41 +0000] "GET / HTTP/1.1" 200 201
189.69.197.182 - - [24/Feb/2019:08:57:28 +0000] "GET / HTTP/1.1" 200 201
146.88.240.128 - - [24/Feb/2019:09:08:17 +0000] "POST / HTTP/1.1\n" 400 226
184.22.213.209 - - [24/Feb/2019:09:27:39 +0000] "GET / HTTP/1.1" 200 201
125.166.140.22 - - [24/Feb/2019:10:10:39 +0000] "GET / HTTP/1.1" 200 201
188.175.76.203 - - [24/Feb/2019:11:14:44 +0000] "GET / HTTP/1.1" 200 201
188.175.76.203 - - [24/Feb/2019:11:14:44 +0000] "GET /favicon.ico HTTP/1.1" 404 209
185.53.88.24 - - [24/Feb/2019:11:21:24 +0000] "HEAD /robots.txt HTTP/1.0" 404 -
188.175.76.203 - - [24/Feb/2019:11:45:47 +0000] "GET / HTTP/1.1" 200 201


http://www.jackhokus.cz/
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

24.2.2019 14:19 NN
Rozbalit Rozbalit vše Re: apache public_html
Odpovědět | | Sbalit | Link | Blokovat | Admin
V dokumentaci se pise, ze:
Note that, by default, access to these directories is not enabled.
24.2.2019 20:18 Jack Hokus | skóre: 34 | blog: LostHeaven
Rozbalit Rozbalit vše Re: apache public_html
Dobrý den,

děkuju za dobře mířené RTFM, zkusil jsem to podle návodu, ale nefunguje to. Zřejmě jsem ještě někde něco zmršil.

http://www.jackhokus.cz/
MMMMMMMMM avatar 24.2.2019 21:08 MMMMMMMMM | skóre: 44 | blog: unstable | Valašsko :-)
Rozbalit Rozbalit vše Re: apache public_html
Odpovědět | | Sbalit | Link | Blokovat | Admin
A jak vypadá konfigurace? např:
# Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir public_html

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
 
Linux Dokumentační Projekt - PDF ke stažení
24.2.2019 21:28 jejda
Rozbalit Rozbalit vše Re: apache public_html
Odpovědět | | Sbalit | Link | Blokovat | Admin
Práva na filesystému máš v pořádku? kdyžtak
chmod o+rx ~/public_html
Jinak to apache nepřečte.
Jendа avatar 24.2.2019 23:47 Jendа | skóre: 78 | blog: Jenda | JO70FB
Rozbalit Rozbalit vše Re: apache public_html
Odpovědět | | Sbalit | Link | Blokovat | Admin
Co znamená „nepřipojím“? V logu vůbec není vidět požadavek pro ti ~peter -- kdyby to bylo jen blbě nastavené, tak tam bude s kódem 404, 403 nebo 500. Opravdu ti běží ten správný webserver na tom správném portu/adrese? netstat -tlpn
25.2.2019 09:10 Jack Hokus | skóre: 34 | blog: LostHeaven
Rozbalit Rozbalit vše Re: apache public_html
Odpovědět | | Sbalit | Link | Blokovat | Admin
Ahoj,

děkuju za všechny odpovědi. Momentálně trochu nestíhám, ale během dvou dní odpovím.

Děkuju za pochopení

Petr
http://www.jackhokus.cz/

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.