there is only one line in there:
alias.url += ("/javascript" => "/usr/share/javascript")
This is a default:
dan@raspberrypi:/etc/lighttpd/conf-enabled $ ls -la
total 8
drwxr-xr-x 2 root root 4096 Oct 19 00:31 .
drwxr-xr-x 4 root root 4096 Oct 19 00:31 ..
lrwxrwxrwx 1 root root 33 Oct 19 00:31 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf
lrwxrwxrwx 1 root root 37 Oct 19 00:31 15-fastcgi-php.conf -> ../conf-available/15-fastcgi-php.conf
lrwxrwxrwx 1 root root 38 Oct 19 00:30 99-unconfigured.conf -> ../conf-available/99-unconfigured.conf
dan@raspberrypi:/etc/lighttpd/conf-enabled $ cat *
--10-fastcgi.conf
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
server.modules += ( "mod_fastcgi" )
--15-fastcgi-php.conf
# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server += ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/var/run/lighttpd/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
--99-unconfigured.conf
# override prior index-file.name directive
# to fall back to default index.lighttpd.html
index-file.names := ( "index.php", "index.html", "index.lighttpd.html" )
should I ln that file here?
I checked the other two files. They are the same as your output.
First find out what put that extra config in, I don't have a javascript redirect in /etc/lighttpd/conf-available
so it's not in the stock Raspbian setup.
That's malformed anyways.
Edit:
Run
lighttpd -p -f /etc/lighttpd/lighttpd.conf
and post up the output.
Here it is:
config {
var.PID = 10206
var.CWD = "/home/pi"
mimetype.assign = (
".ico" => "image/x-icon",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".png" => "image/png",
".svg" => "image/svg+xml",
# 5
".css" => "text/css; charset=utf-8",
".html" => "text/html; charset=utf-8",
".js" => "text/javascript; charset=utf-8",
".json" => "application/json; charset=utf-8",
".map" => "application/json; charset=utf-8",
# 10
".txt" => "text/plain; charset=utf-8",
".eot" => "application/vnd.ms-fontobject",
".otf" => "font/otf",
".ttc" => "font/collection",
".ttf" => "font/ttf",
# 15
".woff" => "font/woff",
".woff2" => "font/woff2",
# 17
)
server.document-root = "/var/www/html"
server.error-handler-404 = "/pihole/index.php"
server.upload-dirs = ("/var/cache/lighttpd/uploads")
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
accesslog.filename = "/var/log/lighttpd/access.log"
accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ("index.php", "index.html", "index.lighttpd.html")
url.access-deny = ("~", ".inc", ".md", ".yml", ".ini")
static-file.exclude-extensions = (".php", ".pl", ".fcgi")
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = (
"application/json",
"application/vnd.ms-fontobject",
"application/xml",
"font/eot",
"font/opentype",
"font/otf",
"font/ttf",
"image/bmp",
"image/svg+xml",
"image/vnd.microsoft.icon",
"image/x-icon",
"text/css",
"text/html",
"text/javascript",
"text/plain",
"text/xml",
# 16
)
server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite",
"mod_fastcgi",
# 9
)
alias.url = (
"/javascript" => "/usr/share/javascript",
)
fastcgi.server = (
".php" => (
(
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/var/run/lighttpd/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000",
# 2
),
"bin-copy-environment" => ("PATH", "SHELL", "USER"),
# 5
"broken-scriptfilename" => "enable",
# 6
),
),
)
expire.url = (
"" => "access plus 0 seconds",
)
$SERVER["socket"] == "[::]:80" {
# block 1
} # end of $SERVER["socket"] == "[::]:80"
$HTTP["url"] =~ "^/admin/" {
# block 2
setenv.add-response-header = (
"X-Pi-hole" => "The Pi-hole Web interface is working!",
"X-Frame-Options" => "DENY",
# 2
)
$HTTP["url"] =~ "\.(eot|otf|tt[cf]|woff2?)$" {
# block 3
setenv.add-response-header = (
"Access-Control-Allow-Origin" => "*",
)
} # end of $HTTP["url"] =~ "\.(eot|otf|tt[cf]|woff2?)$"
} # end of $HTTP["url"] =~ "^/admin/"
$HTTP["url"] =~ "^/admin/\.(.*)" {
# block 4
url.access-deny = ("")
} # end of $HTTP["url"] =~ "^/admin/\.(.*)"
}
Okay, and does
curl http://127.0.0.1/admin/
run all the way to </html>
?
Nothing comes out from running this.....
Okay,
curl -I http://127.0.0.1/admin/
here it is:
HTTP/1.1 500 Internal Server Error
Content-type: text/html; charset=UTF-8
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
Date: Sun, 01 Nov 2020 05:22:17 GMT
Server: lighttpd/1.4.53
Remove that 90-javascript
file.
rm 90-javascript-alias.conf
from conf-enabled?
sudo lighty-disable-mod 90-javascript-alias
Ignoring unknown module: 90-javascript-alias
Run "service lighttpd force-reload" to enable changes
pi@raspberrypi:~ $ service lighttpd force-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to reload 'lighttpd.service'.
Multiple identities can be used for authentication:
- ,,, (pi)
- root
Choose identity to authenticate as (1-2): 1
Password:
==== AUTHENTICATION COMPLETE ===
That file then is unknown and something put it there without lighttpd
's knowledge.
sudo rm
that file and then sudo systemctl restart lighttpd
after the file is gone.
pi@raspberrypi:/etc/lighttpd/conf-enabled $ sudo rm 90-javascript-alias.conf
pi@raspberrypi:/etc/lighttpd/conf-enabled $ sudo systemctl restart lighttpd
Is it working now?
pi@raspberrypi:~ $ curl -i http://127.0.0.1/admin/
HTTP/1.1 500 Internal Server Error
Content-type: text/html; charset=UTF-8
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
Content-Length: 0
Date: Sun, 01 Nov 2020 05:32:39 GMT
Server: lighttpd/1.4.53
That's all I can think of, this is just a stock Raspbian?
cat /etc/os-release
and check apt update
to see if there are any updates to come in.
I don't know what/why that extra config file was installed.
Edit: How did you install Plex?
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="RaspbianForums - Raspbian"
BUG_REPORT_URL="RaspbianBugs - Raspbian"