分页: 1 / 2

[问题]“Apache” “权限” “默认路径”--斑竹进来帮忙解决一下。·[已解决]

发表于 : 2006-08-05 21:19
networker
jerry@Ubuntu:/d/www/per$ ll | grep index.php
-rwxr-x--- 1 root plugdev 13758 2006-08-03 11:55 index.php
jerry@Ubuntu:/d/www/per$ sudo chmod +x index.php
jerry@Ubuntu:/d/www/per$ ll | grep index.php
-rwxr-x--- 1 root plugdev 13758 2006-08-03 11:55 index.php
这里改权限和属组都改不了。不明白问题出在哪里。
-------------------------------------------------------------------------
jerry@Ubuntu:~$ ll /d/www/
total 32
drwxr-x--- 4 root plugdev 8192 2006-07-31 18:31 per
这是目录权限。

/etc/apache2/sites-available/default的配置文件改apache的路径
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /d/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /d/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>
改了之后apache可以启动但是不能访问,改成默认路径就可以访问。下面是显示错误。是权限问题嘛?要怎么改。

jerry@Ubuntu:/var/www$ sudo ln -s /d/www/ /var/www/

这样链接过去还是不行,看不到目录,可能是权限问题。要怎么改。

Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
=========================================================================================================
请高手指点。谢谢。

发表于 : 2006-08-05 21:21
kardinal
a+x

a u g o
+ - =
r w x

发表于 : 2006-08-05 21:25
networker
jerry@Ubuntu:/d/www/per$ sudo chmod a+x index.php
jerry@Ubuntu:/d/www/per$ ll | grep index.php
-rwxr-x--- 1 root plugdev 13758 2006-08-03 11:55 index.php
权限还是加不上去。
即使用sudo chmod 755 ×× 也加不上。

发表于 : 2006-08-05 21:29
kardinal
没有任何提示???

不可能吧?????

发表于 : 2006-08-05 21:44
networker
jerry@Ubuntu:/etc/apache2/sites-available$ sudo /etc/init.d/apache2 restart
* Forcing reload of apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ ok ]
一切正常,命令也没有提示错误。怪了。

发表于 : 2006-08-06 7:34
networker
斑竹请进来帮忙解决一下。

发表于 : 2006-08-06 9:38
eexpress
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
这没问题啊。是说明你不是使用静态ip或者没有申请域名而已。所以本地只能使用127.0.0.1作浏览地址。其他的人可以使用你的外网ip作浏览地址。

发表于 : 2006-08-06 17:29
networker
我说的是上面的问题,改不了权限和改了apache目录之后就不能访问的问题。

发表于 : 2006-08-06 20:48
networker
没人知道嚒,继续顶。。。。。。

发表于 : 2006-08-06 21:01
kardinal
好像不只改一处的……配置文件似乎和原来不一样了:lol:记得以前木有这种两头尖的括号的…………
……你确认是那样改的??
安装一个Webmin吧,不要手动改,狠麻烦的……


不用改根目录的,把你的东东作一个符号链接到 /var/www 就可以了




改下其它地方的权限,看能行不

发表于 : 2006-08-06 21:09
kardinal
楼主的标题里最好包含 “Apache” “权限” “默认路径”字关键字
……不然高手们不清楚你的问题,说不定以为是些鸡毛蒜皮的小事,就无视了……

发表于 : 2006-08-06 22:32
networker
kardinal 写了:好像不只改一处的……配置文件似乎和原来不一样了:lol:记得以前木有这种两头尖的括号的…………
……你确认是那样改的??
安装一个Webmin吧,不要手动改,狠麻烦的……


不用改根目录的,把你的东东作一个符号链接到 /var/www 就可以了




改下其它地方的权限,看能行不
上面已经试过链接的方法了,但是还是不行。

发表于 : 2006-08-07 8:07
networker
没人知道嘛?继续顶下。

发表于 : 2006-08-09 9:51
networker
帖子这么后,自己再顶下。

发表于 : 2006-08-09 9:54
oneleaf
sudo chown -R www-data:www-data /d/www