Kezdőlap › Fórumok › SuSE Linux › SuSE kezdõ › Apache és PHP
- This topic has 38 hozzászólás, 13 résztvevő, and was last updated 18 years, 5 months telt el by
Wait.
-
SzerzőBejegyzés
-
2006-09-25-09:26 #2070960
Nem rootként vagyok.
Most már minden mappának én vagyok a tulajdonosa:
/srv
/www
/htdocs
ennek elenére:
Access forbidden!You don’t have permission to access the requested object. It is either read-protected or not readable by the server.
2006-09-25-10:19 #2070961Keress olyan c onfigot az /etc/apache2 könyvtárban, amiben találsz olyat, hogy
DocumentRoot
Ott mi van neked?
Milyen rendszert használsz???2006-09-25-22:10 #2070962pomm wrote:Keress olyan c onfigot az /etc/apache2 könyvtárban, amiben találsz olyat, hogy
DocumentRoot
Ott mi van neked?
Milyen rendszert használsz???Suse 10.0
Ezt: VirtualHost template találtam csak, ahol a DocumentRoot található.
Szinte olyan, mint amit te bemásoltál, csak az a különbség, hogy nincs kitöltve 🙂2006-09-26-07:27 #2070963csatold vagy kopizd, mert így nem tudom mi áll benne 🙂
2006-09-26-08:07 #2070964#
# VirtualHost template
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
# Files must have the .conf suffix to be loaded.
#
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
# about virtual hosts.
#
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#ServerAdmin webmaster@dummy-host.example.com
ServerName dummy-host.example.com# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot /srv/www/vhosts/dummy-host.example.com# if not specified, the global error log is used
ErrorLog /var/log/apache2/dummy-host.example.com-error_log
CustomLog /var/log/apache2/dummy-host.example.com-access_log combined# don’t loose time with IP address lookups
HostnameLookups Off# needed for named virtual hosts
UseCanonicalName Off# configures the footer on server-generated documents
ServerSignature On# Optionally, include *.conf files from /etc/apache2/conf.d/
#
# For example, to allow execution of PHP scripts:
#
# Include /etc/apache2/conf.d/mod_php4.conf
#
# or, to include all configuration snippets added by packages:
# Include /etc/apache2/conf.d/*.conf# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing „/” apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ „/srv/www/vhosts/dummy-host.example.com/cgi-bin/”# „/srv/www/cgi-bin” should be changed to whatever your ScriptAliased
# CGI directory exists, if you have one, and where ScriptAlias points to.
#
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
# UserDir: The name of the directory that is appended onto a user’s home
# directory if a ~user request is received.
#
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES
# in /etc/sysconfig/apache2.
#
# Note that the name of the user directory („public_html”) cannot simply be
# changed here, since it is a compile time setting. The apache package
# would have to be rebuilt. You could work around by deleting
# /usr/sbin/suexec, but then all scripts from the directories would be
# executed with the UID of the webserver.
UserDir public_html
# The actual configuration of the directory is in
# /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf
# You can, however, change the ~ if you find it awkward, by mapping e.g.
# http://www.example.com/users/karl-heinz/ –> /home/karl-heinz/public_html/
#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
#
# This should be changed to whatever you set DocumentRoot to.
#
#
# Possible values for the Options directive are „None”, „All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that „MultiViews” must be named *explicitly* — „Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be „All”, „None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
2006-09-26-08:33 #2070965zopa57 wrote:#
# VirtualHost template
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
# Files must have the .conf suffix to be loaded.Ez megtörtént? Ugye nem a template-et szerkeszted?
ServerAdmin webmaster@dummy-host.example.com
ServerName dummy-host.example.comEzeket mért nem állítod be valamire, vagy mért nem kommentezed ki?
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot /srv/www/vhosts/dummy-host.example.comItt a lényeg, itt állítod be a webszerver root könyvtárát.
# Optionally, include *.conf files from /etc/apache2/conf.d/
#
# For example, to allow execution of PHP scripts:
#
# Include /etc/apache2/conf.d/mod_php4.conf
#Aztán ezt is ki kellene kommentezni, ha PHP-t is akarsz használni.
# This should be changed to whatever you set DocumentRoot to.
#
Értelemszerűen ezt is ugyanarra kell állítani.
2006-09-26-22:04 #2070966A megoldás egyenlőre az, hogy a httpd.conf-ban itt:
# forbid access to the entire filesystem by defaultOptions None
AllowOverride None
Order deny,allow
# Deny from allA Deny from all elé tettem a #-et 🙂 ………
egy kedves online helper javaslatára.Viszont a – MySQL support Unavailable 🙁
Ezzel vajon mi a tennivaló?2006-09-27-06:35 #2070967Ez valahogy mindenkinek elkerülte a figyelmét ezek szerint. Pedig jogos, csak nem értem hogy alapból miért így van beállítva a http? Meg azt se, hogy mi értelme volt apache2-ben szétszedni a beállításokat, na mindegy.
MySQL support unavaliable – ezt a phpinfo() mondja?
Ha nem akkor keress rá a mysql részekre a fenti függvény kimenetében.Szerk.: vagy meg kell nézni, hogy YAST-tal lehet-e valami php-mysql, vagy ilyesmi csomagot telepíteni. Elképzelhető, hogy mysql támogatás nélkül fordított php-t telepítettél.
2006-09-27-08:55 #2070968A Mysql-t telepítettem a YaST-tal, de nem tudom mi a további teendő.
A /etc mappában találtam mysqlaccess.conf és my.cnf filéket, a access-et értelem szerúen változtattam, de a másikhoz lövésem sincs 🙁
még itt találtam mysql-t
A /var/lib/mysql/temp …. üres
Az /usr/share/mysql – tele mindenféle nyelvi mappával és filével
Valahol olvastam, hogy a localhost gyökerébe kell másolnom mysql fájlokat, de már nem tudom hol, mit és hogyan 🙁2006-09-27-09:10 #2070969Ez idáig rendben, telepítetted a mysql-t. Tudod is használni, ha beállítod és elindítod a szervert. Keresd meg a telepített mysql dokumentációt, a readme vagy install fájlban le van írva, hogyan kell inicializálni, illetve az alapbeállításokat megtenni (user, pass, stb.).
A my.conf-ot kell bemásolnod a home könyvtáradba és beállítani, ahogy akarod.Ha ezek meg vannak, és elindítottad a szervert (vagy automatikusan elindult a rendszerindítással), akkor már hozzá is férsz parancssorból.
Ha PHP-vel szeretnéd használni, az már más tészta. Annak semmi köze a mysql beállításaihoz. Azt a php beállításokban kell keresned. Vagyis mysql támogatással kell fordítani a php-t, vagy olyan csomagot kell keresned php-ből a YAST-tal, ami mysql támogatással lett fordítva.
Még egy: nem írtad, hogy mi írja ki, hogy mysql service unavaliable!
Plusz a phpinfo() kimenetét csatold be! -
SzerzőBejegyzés
- Be kell jelentkezni a hozzászóláshoz.
legutóbbi hsz