Fórumok
Szeretnélek megkérdezni titeket, hogy segítsetek. Szép megoldást keresek arra, hogy megoldjam azt apache servernél, ha olyan linket címeznek meg, ami van, de nincs index file, ne a "file browser" jöjjön be, hanem valami tájékoztató oldat. Az elég gáz lenne, ha mindenhova egy üres index.html-t tennék :)
Esetleg ha van olyan megoldás, hogy megadott helyeken mégis engedélyezve legyen, az lenne a legszebb.
Köszi
Hozzászólások
ScriptAlias /nincsindexesezengemzavar.html /var/www/nincsindexinfo.html
DirectoryIndex index.php index.html index.htm ... /nincsindexesezengemzavar.html
Hmm... Lehet amugy, hogy a ScriptAlias helyett az Alias-t kellene hasznalni, hiszen a /var/www/nincsindexinfo.html nem tunik CGI scriptnek... ;)
Zsiraf
Szerintem az alabbi epp erre valo:
http://httpd.apache.org/docs/2.0/mod/core.html#options
...
Options Directive
Description: Configures what features are available in a particular directory
Syntax: Options [+|-]option [[+|-]option] ...
Default: Options All
...
Indexes
If a URL which maps to a directory is requested, and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing of the directory.
...
Szoval:
Options -Indexes
Zsiraf
azt akarja hogy ne listazzon, hanem egy masik altala meghatarozott szoveg jojjon be, amit te irtal az csak elobbire jo
Hmm... nekem nem ez jott le az illeto leirasabol:
"...hanem valami tájékoztató oldat. Az elég gáz lenne, ha mindenhova egy üres index.html-t tennék :)..."
Ez szerintem azt jelenti, hogy nem tudja hol kapcsolja ki a "konyvtarlistat"... a Options -Indexes pont azt teszi amit irt, nem a konyvtarlistat mutatja, hanem "valami tajekoztato oldalt" ;)
Mindezeken felul ha sajat szoveget akar, akkor hasznalhatja az alabbiakat:
ErrorDocument Directive
Description: What the server will return to the client in case of an error
Syntax: ErrorDocument error-code document
Context: server config, virtual host, directory,
...
In the event of a problem or error, Apache can be configured to do one of four things,
.
1. output a simple hardcoded error message
2. output a customized message
3. redirect to a local URL-path to handle the problem/error
4. redirect to an external URL to handle the problem/error
.
The first option is the default, while options 2-4 are configured using the ErrorDocument directive, which is followed by the HTTP response code and a URL or a message. Apache will sometimes offer additional information regarding the problem/error.
...
ErrorDocument 500 http://foo.example.com/cgi-bin/tester
ErrorDocument 404 /cgi-bin/bad_urls.pl
ErrorDocument 401 /subscription_info.html
ErrorDocument 403 "Sorry can't allow you access today"
Zsiraf
szimlink?
ls -s /aholvan/linkcélja /aholvan/indek.html
Permission Denied nem jó? :)
Mert akkor csak annyi, hogy az Options-nál kiveszed az Indexes-t, így ha nem lesz kezdőlap, akkor permission denied.
--
Discover It - Have a lot of fun!
Erre valo tipikusan az ErrorDocument!
Optionsban az indexelest meg kivenni.
Nem is ertem miert tema ez meg...
Köszi.....
Optionsból kivettem, errorokat lekezeltem, így most csili vili minden
Köszi minkenkinek