🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.www.server-side
4 messages
4 total messages Started by Jivanmukta Sat, 22 Apr 2023 11:22
nie działa PHP ale tylko dla dla userdir
#61560
Author: Jivanmukta
Date: Sat, 22 Apr 2023 11:22
45 lines
2327 bytes
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>
Re: nie działa PHP ale tylko dla dla userdir
#61561
Author: Jivanmukta
Date: Sat, 22 Apr 2023 15:03
62 lines
3019 bytes
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.
Re: nie działa PHP ale tylko dla dla userdir
#61562
Author: 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
Re: nie działa PHP ale tylko dla dla userdir
#61563
Author: Jivanmukta
Date: Fri, 06 Oct 2023 07:50
6 lines
1169 bytes
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ę.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads