Answer the question
In order to leave comments, you need to log in
Apache error 500 on Raspberry pi?
I'm trying to make a home library on Raspberry pi - according to the following instructions:
https://dmitrysnotes.ru/raspberry-pi-3-organizaciy...
- stuck on Apache and COPS connection - when switching to http://ip adress/ebooks
- by the name of the directory that I registered in the config - I agree with the instructions - I get an error 500 and a message that the page cannot be loaded. The directory itself with the site lies as it should be in /var/www/html . Apache itself - and when accessed by ip - issues a welcome page.
What could be the problem?
UPD: .htaccess
DirectoryIndex index.php
<IfModule mod_xsendfile.c>
<Files fetch.php>
XSendFile on
</Files>
</IfModule>
###########################################
# If the notation above don't work, you can try that one
# Disclaimer : I'm no apache expert it can be bad security wise :(
###########################################
#XSendFile On
#XSendFileAllowAbove on
###########################################
# On WAMP one user had to add this line in his httpd.conf
# None of the above was working
###########################################
#XSendFilePath <YourCalibrePath>
###########################################
# If you want to use user based configuration with
# apache 2.4 + php-fpm enable this
# https://github.com/seblucas/cops/issues/213
###########################################
#SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^download/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub [L]
RewriteRule ^download/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3 [L]
RewriteRule ^download/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub [L]
RewriteRule ^download/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2 [L]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xhtml+xml "access plus 0 seconds"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# Webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
</IfModule>
###########################################
# Uncomment if you wish to protect access with a password
###########################################
# If your covers and books are not available as soon as you protect it
# You can try replacing the FilesMatch directive by this one
# <FilesMatch "(index|feed)\.php">
# it helps for Sony PRS-TX and Aldiko, but beware fetch.php can be accessed
# without authentication (see $config ['cops_fetch_protect'] for a workaround).
###########################################
#<FilesMatch "\.php$">
#AuthUserFile /path/to/file
#AuthGroupFile /dev/null
#AuthName "Acces securise"
#AuthType Basic
#Require valid-user
#</FilesMatch>
[Tue Dec 24 15:02:56.898430 2019] [php7:error] [pid 506] [client 192.168.0.100:57256] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 15:26:57.669846 2019] [mpm_prefork:notice] [pid 492] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Tue Dec 24 15:26:57.817562 2019] [mpm_prefork:notice] [pid 492] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Tue Dec 24 15:26:57.817643 2019] [core: notice] [pid 492] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 24 15:27:14.767783 2019] [php7:error] [pid 4376] [client 192.168.0.102:44346] PHP Fatal error : Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks/resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/ book.php(18): require_once()\n#1 /var/www/html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php-epub-meta/epub.php on line 775
[Tue Dec 24 15:38:15.197940 2019] [php7:error] [pid 4377] [client 192.168.0.102:44348] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 15:38:15.950520 2019] [php7:error] [pid 4378] [client 192.168.0.102:44350] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 15:39:58.437542 2019] [php7:error] [pid 4379] [client 192.168.0.102:44352] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 15:45:42.032258 2019] [php7:error] [pid 4382] [client 192.168.0.102:44354] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 15:59:00.042795 2019] [php7:error] [pid 4377] [client 192.168.0.102:44416] script '/var/www/html/index. php' not found or unable to stat
[Tue Dec 24 16:00:01.547645 2019] [php7:error] [pid 4378] [client 192.168.0.102:44418] PHP Fatal error: Uncaught Error: Class 'DOMXPath' not found in /var/www/html/ebooks /resources/php-epub-meta/epub.php:775\nStack trace:\n#0 /var/www/html/ebooks/book.php(18): require_once()\n#1 /var/www/ html/ebooks/index.php(19): require_once('/var/www/html/e...')\n#2 {main}\n thrown in /var/www/html/ebooks/resources/php -epub-meta/epub.php on line 775
[Tue Dec 24 16:03:14.799947 2019] [mpm_prefork:notice] [pid 492] AH00169: caught SIGTERM, shutting down
[Tue Dec 24 16:03:24.818372 2019] [ mpm_prefork:notice] [pid 515] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Tue Dec 24 16:03:24.841346 2019] [core:notice] [pid 515] AH00094: Command line: ' /usr/sbin/apache2'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question