[问题]“Apache” “权限” “默认路径”--斑竹进来帮忙解决一下。·[已解决]
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
[问题]“Apache” “权限” “默认路径”--斑竹进来帮忙解决一下。·[已解决]
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.
=========================================================================================================
请高手指点。谢谢。
-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.
=========================================================================================================
请高手指点。谢谢。
上次由 networker 在 2006-08-09 20:27,总共编辑 5 次。
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
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 ]
一切正常,命令也没有提示错误。怪了。
* 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 ]
一切正常,命令也没有提示错误。怪了。
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
-
- 帖子: 750
- 注册时间: 2006-03-19 11:39
-
- 帖子: 750
- 注册时间: 2006-03-19 11:39
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系:
-
- 帖子: 419
- 注册时间: 2006-02-06 21:06
- 来自: Shanghai,China
- 联系: