🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.www.server-side
Article #61562

Re: nie działa PHP ale tylko dla dla userdir

#61562
From: Jivanmukta
Date: Thu, 27 Apr 2023 11:39
64 lines
3278 bytes
W dniu 22.04.2023 o 17:03, Jivanmukta pisze:
> On 22.04.2023 13:22, Jivanmukta wrote:
>> 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>
> 
> 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.
przeinstalowałem ubuntu i już działa
Technical Details
Message-ID: <u2dmu8$2b28m$1@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.2a01:110f:1532:2300:b72c:8bf5:d9d0:7de1!not-for-mail
References: <u20g1f$1pktb$1@portraits.wsisiz.edu.pl> <u20t0i$1q8ib$1@portraits.wsisiz.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.2a01:110f:1532:2300:b72c:8bf5:d9d0:7de1!not-for-mail
From: Jivanmukta <jivanmukta@poczta.onet.pl>
Newsgroups: pl.comp.www.server-side
Subject: Re: nie działa PHP ale tylko dla dla userdir
Date: Thu, 27 Apr 2023 13:39:52 +0200
Organization: http://www.wit.edu.pl
Message-ID: <u2dmu8$2b28m$1@portraits.wsisiz.edu.pl>
References: <u20g1f$1pktb$1@portraits.wsisiz.edu.pl> <u20t0i$1q8ib$1@portraits.wsisiz.edu.pl>
Mime-Version: 1.0
Injection-Date: Thu, 27 Apr 2023 11:39:53 -0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="2a01:110f:1532:2300:b72c:8bf5:d9d0:7de1"; logging-data="2459926"; mail-complaints-to="abuse@wsisiz.edu.pl"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
In-Reply-To: <u20t0i$1q8ib$1@portraits.wsisiz.edu.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit