我正在运行Ubuntu 8.10并且我已经尽快安装了必要的软件包。在系统&gt; <给药>服务我在列表中看到“Webserver(Apache2)”。
谷歌搜索表明/ etc / hosts文件可能有一个问题,没有行读取“127.0.0.1 localhost”,但我检查了文件,它就在那里。我不知道下一步该做什么。
为了更清楚,尝试转到http://localhost/不会加载任何页面。浏览器只是继续加载,但页面永远不会出现。
这是我的access.log:
192.168.1.101 - - [09/Feb/2009:09:59:54 -0800] "HEAD / HTTP/1.0" 200 - "-" "-"
192.168.1.101 - - [10/Feb/2009:02:10:26 -0800] "HEAD / HTTP/1.0" 200 - "-" "-"
和error.log(主要是我通过摆弄来重置以试图让它工作)
[Mon Feb 09 08:17:47 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Mon Feb 09 15:40:27 2009] [notice] caught SIGTERM, shutting down
[Mon Feb 09 15:42:13 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Mon Feb 09 15:58:27 2009] [notice] caught SIGTERM, shutting down
[Mon Feb 09 15:59:57 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Mon Feb 09 16:31:12 2009] [notice] caught SIGTERM, shutting down
[Mon Feb 09 16:32:45 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Mon Feb 09 16:46:26 2009] [notice] caught SIGTERM, shutting down
[Mon Feb 09 16:49:53 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Mon Feb 09 22:54:51 2009] [notice] caught SIGTERM, shutting down
[Mon Feb 09 22:58:19 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:02:04 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:04:54 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:18:24 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:18:25 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:28:58 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:28:59 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:32:10 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:32:11 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:43:45 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:43:46 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 00:45:51 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 00:45:52 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 02:21:34 2009] [notice] SIGUSR1 received. Doing graceful restart
[Tue Feb 10 02:21:34 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 02:24:39 2009] [notice] SIGUSR1 received. Doing graceful restart
[Tue Feb 10 02:24:40 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:00:33 2009] [notice] SIGUSR1 received. Doing graceful restart
[Tue Feb 10 04:00:33 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:29:03 2009] [notice] SIGUSR1 received. Doing graceful restart
[Tue Feb 10 04:29:03 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:31:12 2009] [notice] SIGUSR1 received. Doing graceful restart
[Tue Feb 10 04:31:12 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:39:45 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 04:41:23 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:48:42 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 04:48:43 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Feb 10 04:48:45 2009] [notice] caught SIGTERM, shutting down
[Tue Feb 10 04:48:50 2009] [notice] Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
答案 0 :(得分:2)
为了让SVN在Ubuntu下使用apache,你需要:
我已经在各种版本的Ubuntu和Debian下通过apache安装了SVN,但从未使用过最新的Ubuntu。我希望我的配置可以帮到你。
安装正确的软件包
确保安装了以下软件包'libapache2-svn'和'subversion'。
启用正确的apache模块
转到'/ etc / apache2 / mods-enabled'文件夹并验证文件'dav_svn.conf'和'dav_svn.load'是否存在。如果他们遗失了,那就干嘛:
sudo a2enmod dav_svn
为apache提供工作配置文件
这是有趣的开始。我已经决定将虚拟主机用于我自己的存储库,即使它对外界不可见。假设您决定在http://svn.localhost/repos/下使您的存储库可用。首先将以下条目添加到'/ etc / hosts'
127.0.0.1 svn.localhost
然后为apache创建配置文件并将其保存到'/ etc / apache2 / sites-enabled /':
<VirtualHost *>
ServerName svn.localhost
ErrorLog /var/log/apache2/svn-error.log
CustomLog /var/log/apache2/svn-access.log combined
<Location /repos>
# Enable the repository
DAV svn
# Path to your repository
SVNPath /home/subversion
# The following allows for basic http authentication.
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
# Allow anonymous read, but make committers authenticate themselves
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
# Have the network shares autocomit their modifications
SVNAutoversioning on
# Needed because Microsoft Web Folders defaults to a timeout of 120, a higher number will work better
DAVMinTimeout 600
#
# Broken WebDAV for Windows XP
#
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS" redirect-carefully
<IfModule mod_headers.c>
Header add MS-Author-Via "DAV"
</IfModule>
<IfModule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
</IfModule>
</Location>
</VirtualHost>
创建存储库
使用以下命令创建存储库:
sudo mkdir -p / home / subversion / sudo svnadmin create / home / subversion / sudo chown -R www-data:www-data / home / subversion /
如果您决定在不同的文件夹下找到您的存储库,请确保在配置文件中更新/ home / subversion /的apache设置。
使用命令htpasswd更新密码文件/etc/apache2/dav_svn.passwd。
答案 1 :(得分:0)
如果我没记错的话,您可以配置Apache绑定的网络接口,默认情况下可能不包括localhost
。
您是否尝试连接计算机的外部主机名或IP(例如192.168.x.y
)?
另外,尝试阅读Ubuntu 8.10的this guide的“安装Apache”部分。