• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] lighttpd und php localhost

Hallo,

ich weiß eigentlich ist das hier die Rubrik für Apache undKonsorten, aber vielleicht kann mir trotzdem jn. helfen:

Ich habe auf meinem Notebook Ubuntu 10.10 zu laufen und habe vor kurzem lighttpd installiert mit php5-cgi. Ich kann zwar auf alle html Dokumente zugreifen, jedoch nicht auf Dokumente mit der Endung php. Ich brauche den Webserver eigentlich bloß um Neuerungen für meine Website vor dem Hochladen zu testen, deshlab hab ich auch server.bind = localhost eingetragen.

Mein Configfile sieht folgendermaßen aus:

Code:
server.modules = (
    "mod_access",
    "mod_alias",
    "mod_accesslog",
    "mod_compress",
    "mod_fastcgi"
)

server.port = 81
server.bind = "localhost"
server.pid-file = "/var/run/lighttpd.pid"
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"

server.username = "www-data"
server.groupname = "www-data"

index-file.names = ( "index.php", "index.html", "index.htm" )
accesslog.filename = "/var/log/lighttpd/access.log"
url.access-deny = ( "~", ".inc", ".htaccess", ".htpasswd" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

server.dir-listing = "enable"
dir-listing.encoding = "utf-8"

compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = (
	"text/plain",
	"text/html",
	"application/x-javascript",
	"text/css"
)

# aktiviert ipv6 support des lightys wenn es das system unterstützt
include_shell "/usr/share/lighttpd/use-ipv6.pl"

#liest die mime types /etc/mime.types aus
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

# laedt die Configs unter /etc/lighttpd/conf-enabled/*.conf
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

Mein config-File für fastcgi:
Code:
## FastCGI programs have the same functionality as CGI programs,
## but are considerably faster through lower interpreter startup
## time and socketed communication
##
## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
##                http://www.lighttpd.net/documentation/fastcgi.html

server.modules   += ( "mod_fastcgi" )

## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server    = ( ".php" => 
	((
		"bin-path" => "/usr/bin/php-cgi",
		"socket" => "/tmp/php.socket",
		"max-procs" => 2,
		"idle-timeout" => 20,
		"bin-environment" => ( 
			"PHP_FCGI_CHILDREN" => "4",
			"PHP_FCGI_MAX_REQUESTS" => "10000"
		),
		"bin-copy-environment" => (
			"PATH", "SHELL", "USER"
		),
		"broken-scriptfilename" => "enable"
	))
)

Wenn ich die php Files mit php-cgi auf der Konsole öffne, dann bekomme ich auch eine sinnvolle Ausgabe. Das php Testdokument hat übrigens alle Rechte.

Mein php Dokument test.php :
Code:
<?php
phpinfo();
?>

Was mache ich falsch ?

Vielen Dank für eure Hilfe!
Viele Grüße
earlgrey_tea
 
OP
earlgrey_tea

earlgrey_tea

Member
Hab jetzt auf apache2 umgestellt. Das waren 2 Klicks, eine Änderung in der port.conf und schon machte der rechner das was ich wollte. Falls jemand trotzdem noch einen Tipp hat, was mit lighttpd nicht stimmt, mmer her damit, man wird ja nicht dümmer! :D

Viele Grüße
earlgrey_tea
 
Oben