Portál AbcLinuxu, 5. listopadu 2025 00:29
/etc/apache2/sites-available/my-site:
<VirtualHost 192.168.1.71:80>
ServerAdmin my@mail-adr.cz
ServerName my.server.cz
DocumentRoot /adr1/
# if mod_perl is used
<IfModule mod_perl.c>
# load all modules
Perlrequire /usr/share/scripts/apache2-startup.pl
# Apache::Reload - Reload Perl Modules when Changed on Disk
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
# set mod_perl2 options
<Location />
ErrorDocument 403 /show-first.pl
ErrorDocument 404 /show-first.pl
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
Order allow,deny
Allow from all
</Location>
</IfModule>
# directory settings
<Directory "/adr1/">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
Alias /images/ "/adr2/"
<Directory "/adr2/">
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Jakmile mám http://my.server.cz/images/1.png obdržím chybovou hlášku "500 Internal Server Error" a dle logů apache2 se snaží onen 1.png interpretovat perlem. Jak zařídit, aby se obrázky poslaly do prohlížeče normálně a ten je zobrazil?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.