お世話に成ります
YosiさんのApacheの基本設定の頁で質問です、
現在:DocumentRoot /home/httpd/mastor
グループ:adminn ユーザーmasutor
ProFTPD:ホームデレクトリーhome/masutor
グループ adominn
-------------------------------------------------------------
デレクトリーの設定変更の行で
/home/httpd/cgi-binデレクトリの移動で
自分の場合も下記で良いですか?
-----------------------------------------------------------
# cd /home/httpd
# cgi-bin html ←htmlで良いのか
#chgrp -R adminn/home/httpd
#chown -R mastor/home/httpd
----------------------------------------------------------
現在bbs.cgiとindex.htmlの混じった掲示板をcgi-binの下に設定すると、index.htmlがポート80エラーに成るので
例:httpd/cgi-bin/pppp/bbs.cgi
httpd/pppp/index.html で設定してますが
-----------------------------------------------------------
デレクトリの設定変更で
httpd/cgi-binの下で無く
httpd/masutorの下にcgi の設定可能になるのですか?
sgさんのお陰でほんの少し解る様に成ったのですが未だ未熟故説明が下手なのですが宜しくお願い致します
$ su -
# emacs /etc/httpd/conf.d/ystep.conf
ここで、次のようなファイルを作ってしまったらどうでしょう。
#---------------------------------
# ルート・ディレクトリの指定
DocumentRoot /home/httpd/mastor
# CGIスクリプトの拡張子
AddHandler cgi-script .cgi
# DocumentRootの各種設定
<Directory /home/httpd/mastor>
# Options ExecCGI: CGI実行を許可する
Options ExecCGI
# AllowOverride All: .htaccessで設定値の変更をすべて可能とする
AllowOverride All
</Directory>
#---------------------------------
このファイルを作ってApacheを再起動し、動作確認してダメなら
このファイル自体を削除すりゃー、元の状態に戻るので
一度、やってみてくださいな。
ただし、すでにたくさんhttpd.confを書き換えているようなので
上記で必ずうまくいくかはわかりません。
> $ su -
> # emacs /etc/httpd/conf.d/ystep.conf
> ここで、次のようなファイルを作ってしまったらどうでしょう。
>
> #---------------------------------
> # ルート・ディレクトリの指定
> DocumentRoot /home/httpd/mastor
>
> # CGIスクリプトの拡張子
> AddHandler cgi-script .cgi
>
> # DocumentRootの各種設定
> <Directory /home/httpd/mastor>
> # Options ExecCGI: CGI実行を許可する
> Options ExecCGI
> # AllowOverride All: .htaccessで設定値の変更をすべて可能とする
> AllowOverride All
> </Directory>
> #---------------------------------
>
> このファイルを作ってApacheを再起動し、動作確認してダメなら
> このファイル自体を削除すりゃー、元の状態に戻るので
> 一度、やってみてくださいな。
> ただし、すでにたくさんhttpd.confを書き換えているようなので
> 上記で必ずうまくいくかはわかりません。
-----------------------------------------------------------
現在の状態です
-----------------------------------------------------------、
user nobody
Group nobody
-----------------------------------------------------------------------
<Directory />
Options FollowSymLinks
AllowOverride None
</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 /home/httpd/html>←**変更で良いですか(master)
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options ExecCGI FollowSymLinks Includes
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbi
-----------------------------------------------------------------------------
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/ #コメントアウトするのですか?
#
# "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory /home/httpd/cgi-bin>
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
------------------------------------------------------------------------
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi.pl
AddHandler image/gif .gif
AddHandler image/jpeg .jpeg
AddHandler image/png .png
AddHandler text/html .html .htm
#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml
#
# Uncomment the following line to enable Apache's send-asis HTTP file
# feature
#
現在の状況は無関係。上に書いたことをもう一度よく読んで。
> 現在の状況は無関係。上に書いたことをもう一度よく読んで。
/etc/httpd/conf.d/ystep.conf
-------------------------------------
DocumentRoot /home/httpd/master
AddHandler cgi-script .cgi
<Directory /home/httpd/master>
Options ExecCGI
AllowOverride All
</Directory>
で保存で良いですか、
> > 現在の状況は無関係。上に書いたことをもう一度よく読んで。
> /etc/httpd/conf.d/ystep.conf
> -------------------------------------
> DocumentRoot /home/httpd/master
> AddHandler cgi-script .cgi
> <Directory /home/httpd/master>
> Options ExecCGI
> AllowOverride All
> </Directory>
> で保存で良いですか、
------------------------------------------------
有難う御座います
何がどうなって作用してるか解りませんが?
出来ました、仮テストで
http://my-hobby.ddo.jp/aska/aska.cgi
もう一度、よく読んで。
それと、どうしてわざわざコメントをはずすんでしょうか?
コメントを入れておいたほうが明らかにわかりやすいのに。
> もう一度、よく読んで。
>
> それと、どうしてわざわざコメントをはずすんでしょうか?
> コメントを入れておいたほうが明らかにわかりやすいのに。
#が有れば日本語も問題無いのですか?
今から挿入可能ですか。
> #が有れば日本語も問題無いのですか?
そうです。
だから、設定ファイルには、わかったところだけでも日本語でコメントを入れましょう。
これをずーっと続けていれば、いつかはわかるようになりますよ。
> 今から挿入可能ですか。
できます、emacsで編集しましょう。
> > #が有れば日本語も問題無いのですか?
>
> そうです。
> だから、設定ファイルには、わかったところだけでも日本語でコメントを入れましょう。
> これをずーっと続けていれば、いつかはわかるようになりますよ。
>
> > 今から挿入可能ですか。
>
> できます、emacsで編集しましょう。
有難うございます、頭悪いけれど少しずつ分かる気がします。