質問: エラーメッセージ「このサーバーにアクセスする権限がありません」 私は自分でapacheを設定し、仮想ホストに phpmyadmin をロードしようとしましたが、私は次のことを受け取りました。 403禁止このサーバーへのアクセス権限はありません 私のhttpd.conf# # this is the main apache http server configuration file. it contains the # configuration directives that give the server its instructions. # see <url:http://httpd.apache.org/docs/2.2> for detailed information. # in particular, see # <url:http://httpd.apache.org/docs/2.2/mod/directives.html> # for a discussion of each configuration directive. # # do not simply read the instructions in here without understanding # what they do. they're here only as hints or reminders. if you are unsure # consult the online docs. you have been warned. # # configuration and logfile names: if the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for win32), the # server will use that explicit path. if the filenames do *not* begin # with "/", the value of serverroot is prepended -- so "logs/foo.log" # with serverroot set to "c:/program files (x86)/apache software foundation/apache2.2" will be interpreted by the # server as "c:/program files (x86)/apache software foundation/apache2.2/logs/foo.log". # # note: where filenames are specified, you must use forward slashes # instead of backslashes (e.g., "c:/apache" instead of "c:\apache"). # if a drive letter is omitted, the drive on which httpd.exe is located # will be used by default. it is recommended that you always supply # an explicit drive letter in absolute paths to avoid confusion. # # serverroot: the top of the directory tree under which the server's # configuration, error, and log files are kept. # # do not add a slash at the end of the directory path. if you point # serverroot at a non-local disk, be sure to point the lockfile directive # at a local disk. if you wish to share the same serverroot for multiple # httpd daemons, you will need to change at least lockfile and pidfile. # serverroot "c:/program files (x86)/apache software foundation/apache2.2" # # listen: allows you to bind apache to specific ip addresses and/or # ports, instead of the default. see also the <virtualhost> # directive. # # change this to listen on specific ip addresses as shown below to # prevent apache from glomming onto all bound ip addresses. # #listen 12.34.56.78:80 listen 127.0.0.1:80 include conf/vhosts.conf # # dynamic shared object (dso) support # # to be able to use the functionality of a module which was built as a dso you # have to place corresponding `loadmodule' lines at this location so the # directives contained in it are actually available _before_ they are used. # statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # example: # loadmodule foo_module modules/mod_foo.so # loadmodule actions_module modules/mod_actions.so loadmodule alias_module modules/mod_alias.so loadmodule asis_module modules/mod_asis.so loadmodule auth_basic_module modules/mod_auth_basic.so #loadmodule auth_digest_module modules/mod_auth_digest.so #loadmodule authn_alias_module modules/mod_authn_alias.so #loadmodule authn_anon_module modules/mod_authn_anon.so #loadmodule authn_dbd_module modules/mod_authn_dbd.so #loadmodule authn_dbm_module modules/mod_authn_dbm.so loadmodule authn_default_module modules/mod_authn_default.so loadmodule authn_file_module modules/mod_authn_file.so #loadmodule authnz_ldap_module modules/mod_authnz_ldap.so #loadmodule authz_dbm_module modules/mod_authz_dbm.so loadmodule authz_default_module modules/mod_authz_default.so loadmodule authz_groupfile_module modules/mod_authz_groupfile.so loadmodule authz_host_module modules/mod_authz_host.so #loadmodule authz_owner_module modules/mod_authz_owner.so loadmodule authz_user_module modules/mod_authz_user.so loadmodule autoindex_module modules/mod_autoindex.so #loadmodule cache_module modules/mod_cache.so #loadmodule cern_meta_module modules/mod_cern_meta.so loadmodule cgi_module modules/mod_cgi.so #loadmodule charset_lite_module modules/mod_charset_lite.so #loadmodule dav_module modules/mod_dav.so #loadmodule dav_fs_module modules/mod_dav_fs.so #loadmodule dav_lock_module modules/mod_dav_lock.so #loadmodule dbd_module modules/mod_dbd.so #loadmodule deflate_module modules/mod_deflate.so loadmodule dir_module modules/mod_dir.so #loadmodule disk_cache_module modules/mod_disk_cache.so #loadmodule dumpio_module modules/mod_dumpio.so loadmodule env_module modules/mod_env.so #loadmodule expires_module modules/mod_expires.so #loadmodule ext_filter_module modules/mod_ext_filter.so #loadmodule file_cache_module modules/mod_file_cache.so #loadmodule filter_module modules/mod_filter.so #loadmodule headers_module modules/mod_headers.so #loadmodule ident_module modules/mod_ident.so #loadmodule imagemap_module modules/mod_imagemap.so loadmodule include_module modules/mod_include.so #loadmodule info_module modules/mod_info.so loadmodule isapi_module modules/mod_isapi.so #loadmodule ldap_module modules/mod_ldap.so #loadmodule logio_module modules/mod_logio.so loadmodule log_config_module modules/mod_log_config.so #loadmodule log_forensic_module modules/mod_log_forensic.so #loadmodule mem_cache_module modules/mod_mem_cache.so loadmodule mime_module modules/mod_mime.so #loadmodule mime_magic_module modules/mod_mime_magic.so loadmodule negotiation_module modules/mod_negotiation.so #loadmodule proxy_module modules/mod_proxy.so #loadmodule proxy_ajp_module modules/mod_proxy_ajp.so #loadmodule proxy_balancer_module modules/mod_proxy_balancer.so #loadmodule proxy_connect_module modules/mod_proxy_connect.so #loadmodule proxy_ftp_module modules/mod_proxy_ftp.so #loadmodule proxy_http_module modules/mod_proxy_http.so #loadmodule proxy_scgi_module modules/mod_proxy_scgi.so #loadmodule reqtimeout_module modules/mod_reqtimeout.so #loadmodule rewrite_module modules/mod_rewrite.so loadmodule setenvif_module modules/mod_setenvif.so #loadmodule speling_module modules/mod_speling.so #loadmodule ssl_module modules/mod_ssl.so #loadmodule status_module modules/mod_status.so #loadmodule substitute_module modules/mod_substitute.so #loadmodule unique_id_module modules/mod_unique_id.so #loadmodule userdir_module modules/mod_userdir.so #loadmodule usertrack_module modules/mod_usertrack.so #loadmodule version_module modules/mod_version.so #loadmodule vhost_alias_module modules/mod_vhost_alias.so loadmodule php5_module "c:/program files/php/php5apache2_2.dll" <ifmodule !mpm_netware_module> <ifmodule !mpm_winnt_module> # # if you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # user/group: the name (or #number) of the user/group to run httpd as. # it is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # user daemon group daemon </ifmodule> </ifmodule> # 'main' server configuration # # the directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <virtualhost> definition. these values also provide defaults for # any <virtualhost> containers you may define later in the file. # # all of these directives may appear inside <virtualhost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # serveradmin: your address, where problems with the server should be # e-mailed. this address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # serveradmin webmaster@somenet.com # # servername gives the name and port that the server uses to identify itself. # this can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # if your host doesn't have a registered dns name, enter its ip address here. # #servername www.somenet.com:80 # # 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 "c:/program files (x86)/apache software foundation/apache2.2/htdocs" # # each directory to which apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # first, we configure the "default" to be a very restrictive set of # features. # <directory /> options followsymlinks allowoverride none order deny,allow deny from all </directory> # # note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # this should be changed to whatever you set documentroot to. # <directory "c:/program files (x86)/apache software foundation/apache2.2/htdocs"> # # 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.2/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 </directory> # # directoryindex: sets the file that apache will serve if a directory # is requested. # <ifmodule dir_module> directoryindex index.html index.php </ifmodule> # # the following lines prevent .htaccess and .htpasswd files from being # viewed by web clients. # <filesmatch "^\.ht"> order allow,deny deny from all satisfy all </filesmatch> # # errorlog: the location of the error log file. # if you do not specify an errorlog directive within a <virtualhost> # container, error messages relating to that virtual host will be # logged here. if you *do* define an error logfile for a <virtualhost> # container, that host's errors will be logged there and not here. # errorlog "logs/error.log" # # loglevel: control the number of messages logged to the error_log. # possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # loglevel warn <ifmodule log_config_module> # # the following directives define some format nicknames for use with # a customlog directive (see below). # logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\"" combined logformat "%h %l %u %t \"%r\" %>s %b" common <ifmodule logio_module> # you need to enable mod_logio.c to use %i and %o logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %i %o" combinedio </ifmodule> # # the location and format of the access logfile (common logfile format). # if you do not define any access logfiles within a <virtualhost> # container, they will be logged here. contrariwise, if you *do* # define per-<virtualhost> access logfiles, transactions will be # logged therein and *not* in this file. # customlog "logs/access.log" common # # if you prefer a logfile with access, agent, and referer information # (combined logfile format) you can use the following directive. # #customlog "logs/access.log" combined </ifmodule> <ifmodule alias_module> # # redirect: allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. the client # will make a new request for the document at its new location. # example: # redirect permanent /foo http://www.somenet.com/bar # # alias: maps web paths into filesystem paths and is used to # access content that does not live under the documentroot. # example: # alias /webpath /full/filesystem/path # # if you include a trailing / on /webpath then the server will # require it to be present in the url. you will also likely # need to provide a <directory> section to allow access to # the filesystem path. # # scriptalias: this controls which directories contain server scripts. # scriptaliases are essentially the same as aliases, except that # documents in the target 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/ "c:/program files (x86)/apache software foundation/apache2.2/cgi-bin/" </ifmodule> <ifmodule cgid_module> # # scriptsock: on threaded servers, designate the path to the unix # socket used to communicate with the cgi daemon of mod_cgid. # #scriptsock logs/cgisock </ifmodule> # # "c:/program files (x86)/apache software foundation/apache2.2/cgi-bin" should be changed to whatever your scriptaliased # cgi directory exists, if you have that configured. # <directory "c:/program files (x86)/apache software foundation/apache2.2/cgi-bin"> allowoverride none options none order allow,deny allow from all </directory> # # defaulttype: the default mime type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # if your server contains mostly text or html documents, "text/plain" is # a good value. if most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # defaulttype text/plain <ifmodule mime_module> # # typesconfig points to the file containing the list of mappings from # filename extension to mime-type. # typesconfig conf/mime.types # # addtype allows you to add to or override the mime configuration # file specified in typesconfig for specific file types. # #addtype application/x-gzip .tgz # # addencoding allows you to have certain browsers uncompress # information on the fly. note: not all browsers support this. # #addencoding x-compress .z #addencoding x-gzip .gz .tgz # # if the addencoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # addtype application/x-compress .z addtype application/x-gzip .gz .tgz # # addhandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. these can be either built into the server # or added with the action directive (see below) # # to use cgi scripts outside of scriptaliased directories: # (you will also need to add "execcgi" to the "options" directive.) # #addhandler cgi-script .cgi # for type maps (negotiated resources): #addhandler type-map var # # filters allow you to process content before it is sent to the client. # # to parse .shtml files for server-side includes (ssi): # (you will also need to add "includes" to the "options" directive.) # #addtype text/html .shtml #addoutputfilter includes .shtml addtype application/x-httpd-php .php </ifmodule> # # the mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. the mimemagicfile # directive tells the module where the hint definitions are located. # #mimemagicfile conf/magic # # customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # some examples: #errordocument 500 "the server made a boo boo." #errordocument 404 /missing.html #errordocument 404 "/cgi-bin/missing_handler.pl" #errordocument 402 http://www.somenet.com/subscription_info.html # # # maxranges: maximum number of ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # default setting is to accept 200 ranges. #maxranges unlimited # # enablemmap and enablesendfile: on systems that support it, # memory-mapping or the sendfile syscall is used to deliver # files. this usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # #enablemmap off #enablesendfile off # supplemental configuration # # the configuration files in the conf/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # server-pool management (mpm specific) #include conf/extra/httpd-mpm.conf # multi-language error messages #include conf/extra/httpd-multilang-errordoc.conf # fancy directory listings #include conf/extra/httpd-autoindex.conf # language settings #include conf/extra/httpd-languages.conf # user home directories #include conf/extra/httpd-userdir.conf # real-time info on requests and configuration #include conf/extra/httpd-info.conf # virtual hosts #include conf/extra/httpd-vhosts.conf # local access to the apache http server manual #include conf/extra/httpd-manual.conf # distributed authoring and versioning (webdav) #include conf/extra/httpd-dav.conf # various default settings #include conf/extra/httpd-default.conf # secure (ssl/tls) connections #include conf/extra/httpd-ssl.conf # # note: the following must must be present to support # starting without ssl on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <ifmodule ssl_module> sslrandomseed startup builtin sslrandomseed connect builtin </ifmodule> phpinidir "c:/program files/php" そしてvhosts.conf:namevirtualhost 127.0.0.1:80 <virtualhost 127.0.0.1:80> documentroot i:/projects/webserver/__tools/phpmyadmin/ servername dbadmin.tools </virtualhost>
回答: 私はこの問題に遭遇しました、そして私の解決策はwww-dataが適切なフォルダを所有していなかったということでした、そして代わりにそれを所有するためにユーザの1人のためにそれを設定しました。 (私はちょっとした空想をやろうとしていましたが、ftpをうまく再生させるための誤ったトリックです。)実行後:chown -r www-data:www-data /var/www/html マシンはデータの提供を再開しました。あなたは現在誰がフォルダを所有しているかを見ることができます。ls -l /var/www/html