Odp: Lighttpd + php5 = nie działa
A działa Ci tam jeszcze httpd/uhttpd? jak tak to przesuń je na inny port (np. 82) i będziesz miał wszystko wolne.
Nie jesteś zalogowany. Proszę się zalogować lub zarejestrować.
eko.one.pl → Oprogramowanie / Software → Lighttpd + php5 = nie działa
Strony Poprzednia 1 2 3 4 5 Następna
Zaloguj się lub zarejestruj by napisać odpowiedź
A działa Ci tam jeszcze httpd/uhttpd? jak tak to przesuń je na inny port (np. 82) i będziesz miał wszystko wolne.
hmm... uhttpd i httpd odpuscilem sobie. Jesli tego nie instalowalem, to chyba nie mam. Jak to sprawdzic?
ps polecenie.
Jezeli masz gargoyle - to masz httpd. jeżeli openwrt z luci to uhttpd. Jak nie to nic ![]()
No ok, ale nie chce czegos namieszac. Mam to przestawic w jednym miejscu, czy jeszcze gdzies? Przydalaby sie podpowiedz, gdzie tego szukac
A i jeszcze jedno: Czy nie bedzie to przeszkadzalo w wejsciu na web-gui routera przez https po wan (jak dotychczas)?
Znalazlem w
/etc/config/httpd_gargoylewpis:
option http_port "80"Czy wystarczy tylko tu zmienic na 82?
Dobra, zmienilem jak wyzej, tylko na router musze wchodzic
http://192.168.1.1:82/ ale to detal. Cos jeszcze nie gra, bo:
# /etc/init.d/lighttpd restart
sh: you need to specify whom to kill
2010-12-22 23:23:53: (network.c.345) can't bind to port: 443 Address already in usePlik konfiguracyjny:
# lighttpd configuration file
#
## modules to load
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)
# force use of the "write" backend (closes: #2401)
server.network-backend = "write"
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/www1/"
server.follow-symlink = "enable"
server.dir-listing = "enable"
## where to send error-messages to
#server.errorlog = "/var/log/lighttpd/error.log"
## files to check for if .../ is requested
index-file.names = ( "index.html", "index.php", "index.htm", )
cgi.assign = (
".php" => "/usr/bin/php-cgi",
".sh" => "/bin/sh"
)
## mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".class" => "application/octet-stream",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml"
)
## Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetypes.use-xattr = "enable"
## send a different Server: header
## be nice and keep it at lighttpd
server.tag = "lighttpd"
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
#server.port = 8080
## bind to localhost (default: all interfaces)
#server.bind = "localhost"
## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
#simple-vhost.default-host = "grisu.home.kneschke.de"
#simple-vhost.document-root = "/pages/"
##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/www/error-"
## virtual directory listings
#server.dir-listing = "enable"
## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"
## change uid to <uid> (default: don't care)
#server.username = "nobody"
#
server.upload-dirs = ( "/tmp" )
## change uid to <uid> (default: don't care)
#server.groupname = "nobody"
#### compress module
#compress.cache-dir = "/dev/null/"
#compress.filetype = ("text/plain", "text/html")
#### proxy module
## read proxy.txt for more info
#proxy.server = (
# ".php" => (
# "localhost" => (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
#)
#### fastcgi module
## read fastcgi.txt for more info
#fastcgi.server = (
# ".php" => (
# "localhost" => (
# "socket" => "/tmp/php-fastcgi.socket",
# "bin-path" => "/usr/local/bin/php"
# )
# )
#)
#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
#### SSL engine
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
}
#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"
#### auth module
## read authentification.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
#auth.require = (
# "/server-status" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.10"
# ),
# "/prv" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=dave"
# )
#)
#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### ssi
#ssi.extension = ( ".shtml" )
#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )
#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"
## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")
#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"
#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1
#### webdav
#$HTTP["url"] =~ "^/webdav($|/)" {
# webdav.activate = "enable"
# webdav.is-readonly = "enable"
# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
#}pewnie port 443 masz zajety przez gargoyle albo luci
szukaj w konfiguracji innych serwerow i przesun na inny port
pewnie port 443 masz zajety przez gargoyle albo luci
szukaj w konfiguracji innych serwerow i przesun na inny port
No uzywam tego portu do web-gui po https od strony WAN. Moze to?
no pewnie tak
kazdy port moze być uzywany prez tylko jeden serwer.
wiec jezeli chcesz udostepniać zawartosc z lighttod naporcie 443, to w drugin serwerze, ktory ci pracuje na routerze musisz zmienic port na inny. w konfiguracji tego drugiego serwera zmien 443 na na przyklad 444 i tyle.
potem oczywiscie restart serwera
No super, pomoglo. Pytanko: Czy
/etc/init.d/lighttpd restartto jest docelowe polecenie, czy istnieje jakis demon (usluga dzialajaca w tle), ktory nie blokuje putty?
czekaj.
z tego, co zrozumialem, to ty chcesz mieć wypuszczony na wan lighttpd przez ssl (https)
jezeli tak, to w konfiguracji lighttpd ustawiasz ssl na port 443, w drugin serwerze przestawiasz ssl na inny port i restartujesz oba serwery.
niebardzo rozumiem, co ma do tego putty - rozwin ![]()
Ech... nie jestem pewien, czy jest jeszcze jakies inne magiczne polecenie do odpalenia tego serwera tak, zeby dzialalo w tle. Poki co, to lighttpd w putty jest w trybie "modal" i nie da sie nic wpisac.
nie.
jak nic nie blokuje portu, to powinno ci wszystko smigać
dla pewnosci mozesz zrobic
/etc/init.d/lighttpd enableto,zeby sie serwer automatycznie uruchamial po resecie
jak chodzi o wiszące putty, to wiesz... to jest konsola podpieta do routera - czasem sie wiesza.
pare razy mi sie zdazylo ze sie zwiesiła po ospaleniui czegoś. zamknij putty i uruchom połączenie jeszcze raz - zwykle pomaga ![]()
No dzieki Wam wszystkim.
@patryk, teraz moglem wyprobowac Twoj skrypcik. Fajna zabawka lol, teraz bede musial poszukac czegos do zarzadzania plikami.
tylko jak chcesz ten skrypt zrobic dostepny od strony wan, to doinstaluj sobie jeszcze lighttpd-mod-auth i wrzuc skrypt do chronionego katalogu, bo wiesz... on pozwala zrobic wszystko (włącznie z zajechaniem systemu i bootloadera) ![]()
to jakbys konsole i hasło roota udostepnił
tylko jak chcesz ten skrypt zrobic dostepny od strony wan, to doinstaluj sobie jeszcze lighttpd-mod-auth i wrzuc skrypt do chronionego katalogu, bo wiesz... on pozwala zrobic wszystko (włącznie z zajechaniem systemu i bootloadera)
to jakbys konsole i hasło roota udostepnił
Otoz to, dlatego kill-nalem go na noc. Dzieki za wskazanie modulu ![]()
Hmm... Czy jest gdzies dostepny jakis plik konfiguracyjny z dzialajacym lighttpd-mod-auth? Na pewno trzeba odhaczyc
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)cos zrobic z
#### auth module
## read authentification.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
#auth.require = (
# "/server-status" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.10"
# ),
# "/prv" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=dave"
# )
#)i jeszcze odpalic cos podobnego do
lighty-enable-mod authale troche to ciezko strawne jak na mnie. Znajac zycie, to dopiero poczatek zabawy.
Tu masz przy okazji rtorrenta to opisałem: http://openrouter.info/forum/viewtopic. … &t=471
czy jest dostępny? teraz juz tak
zmień sobie tylko port, jak nie chcesz http na 80 i ssl na 443
# lighttpd configuration file
#
## modules to load
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)
# force use of the "write" backend (closes: #2401)
server.network-backend = "write"
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/www2/"
server.follow-symlink = "enable"
server.dir-listing = "enable"
## where to send error-messages to
#server.errorlog = "/var/log/lighttpd/error.log"
## files to check for if .../ is requested
index-file.names = ( "index.html", "index.php", "index.htm", )
cgi.assign = (
".php" => "/usr/bin/php-cgi",
".sh" => "/bin/sh"
)
## mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".class" => "application/octet-stream",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml"
)
## Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetypes.use-xattr = "enable"
## send a different Server: header
## be nice and keep it at lighttpd
server.tag = "lighttpd.test"
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
#server.port = 81
## bind to localhost (default: all interfaces)
#server.bind = "localhost"
## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
#simple-vhost.default-host = "grisu.home.kneschke.de"
#simple-vhost.document-root = "/pages/"
##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/www/error-"
## virtual directory listings
#server.dir-listing = "enable"
## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"
## change uid to <uid> (default: don't care)
#server.username = "nobody"
#
server.upload-dirs = ( "/tmp" )
## change uid to <uid> (default: don't care)
#server.groupname = "nobody"
#### compress module
#compress.cache-dir = "/dev/null/"
#compress.filetype = ("text/plain", "text/html")
#### proxy module
## read proxy.txt for more info
#proxy.server = (
# ".php" => (
# "localhost" => (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
#)
#### fastcgi module
## read fastcgi.txt for more info
#fastcgi.server = (
# ".php" => (
# "localhost" => (
# "socket" => "/tmp/php-fastcgi.socket",
# "bin-path" => "/usr/local/bin/php"
# )
# )
#)
#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
#### SSL engine
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"
#### auth module
## read authentification.txt for more info
auth.backend = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
auth.require = (
# "/server-status" => (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.10"
# ),
"/prv" => (
"method" => "digest",
"realm" => "tajne pliki badiewiaka",
"require" => "user=badziewiak"
)
)
#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### ssi
#ssi.extension = ( ".shtml" )
#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )
#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"
## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")
#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"
#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1
#### webdav
#$HTTP["url"] =~ "^/webdav($|/)" {
# webdav.activate = "enable"
# webdav.is-readonly = "enable"
# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
#}do tego robisz sobie plik '/etc/lighttpd/lighttpd.user' o zawartości
badziewiak:super_tajne_hasłotworzysz katalog '/www2/prv'
robisz
/etc/init.d/lighttpd restartod tego momentu wszysko zaczynające sie od 'http://adres_routera/prv/' i 'https://adres_routera/prv/' bedzie wymagało zalogowania sie jako 'badziewiak' z hasłem 'super_tajne_hasło'
rachunek przyjdzie pocztą ![]()
WOW! No dobra, a jesli bede chcial wejsc od strony WAN po https?
to dokładnie to samo jak cie firewall puszcza, to https://adres_wan/prv/
No postaw to na 443
. Chodziło o zabezpieczenie dostępu do folder, httpsy i inne takie to oddzielna historia którą też musisz zrobić.
Nooo to jak taki dobry jestes, to jeszcze o cos zapytam (jesli mozna): Jak wpisuje aders routera po https, to wychodzi mi zawartosc www2 (prv), ale to pikus, bo do prv chce haslo. Znalazlem taki fajny skrypcik, ktory ma cos do instalacji: http://heanet.dl.sourceforge.net/projec … _2.0.1.zip
Zapewne bedziesz wiedzial jak to zainstalowac. Ja to bym wrzucil do /www2/prv i po instalacji powinna pokazac sie stronka, tylko jeszcze trzeba odpalic cos magicznego zeby sie zainstalowalo.
No postaw to na 443
. Chodziło o zabezpieczenie dostępu do folder, httpsy i inne takie to oddzielna historia którą też musisz zrobić.
Juz to zrobilem i wyglada na to, ze dziala ![]()
To trzeba rozpakować i wsadzić do katalogu gdzie chcesz. I pewnie tyle, bo tam jakiś index.php będzie. w katalog config masz plik config.php gdzie parę rzeczy możesz ustawić.
Jak w większości projektów masz tam plik README.txt gdzie to wszystko jest opisane ![]()
a tak właściwie to teges... nie mozna po prostu przestawic ssh na port 443? ![]()
Strony Poprzednia 1 2 3 4 5 Następna
Zaloguj się lub zarejestruj by napisać odpowiedź
eko.one.pl → Oprogramowanie / Software → Lighttpd + php5 = nie działa
Forum oparte o PunBB, wspierane przez Informer Technologies, Inc