Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nie działa PHP ale tylko dla dla userdir

0 views
Skip to first unread message

Jivanmukta

unread,
Apr 22, 2023, 7:22:24 AM4/22/23
to
Mam problem z konfigacją Apache2 dla PHP5.6 w Ubuntu 22.04.
Nie są serwowane pliki .php w userdir, ale w /var/www/html jest OK.
Nie wiem co mam źle w konfiguracją bo userdir.conf zawiera:

<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes Options
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
</IfModule>

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

Natomiast mods-enabled/php5.6.conf:


<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
Require all denied
</FilesMatch>

# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
# php_admin_flag engine Off
</Directory>
</IfModule>

Jivanmukta

unread,
Apr 22, 2023, 11:03:48 AM4/22/23
to
Dodanie do apache2.conf linii:

DocumentRoot /home/robert/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/robert/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

nie pomaga. Nadal problem.

Jivanmukta

unread,
Apr 27, 2023, 7:39:54 AM4/27/23
to
W dniu 22.04.2023 o 17:03, Jivanmukta pisze:
przeinstalowałem ubuntu i już działa

Jivanmukta

unread,
Oct 6, 2023, 3:50:24 AM10/6/23
to
On 27.04.2023 13:39, Jivanmukta wrote:

> przeinstalowałem ubuntu i już działa

Po pewnym czasie w nowym Ubuntu znowu przestało działać. Przecież nie
mogę ciągle przeinstalowwywać systemu. Co robić? Pomóżcie proszę.


0 new messages