【问题标题】:Redmine working on localhost but not accessible from the web? [closed]Redmine 在本地主机上工作但无法从网络访问? [关闭]
【发布时间】:2011-12-14 21:18:02
【问题描述】:

我最近在工作时在我的 Ubuntu 11.10 机器上安装了 Redmine, 并让它从 localhost/redmine 正常工作。现在我试图把 它在网上供我办公室的其他人使用,但我遇到了 在某处搭便车。我通读了多个线程,但没有找到 回答。最新的事情是追加

Redmine::Utils::relative_url_root = "/redmine"

我尝试通过我的http://2222.us/redmine 访问它,但只收到 连接超时错误。我的httpd.conf的内容只有一行

服务器名称 127.0.0.1

端口 80 正在监听

# netstat -nao | grep 80

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN off (0.00/0/0)

我为 Redmine 启用站点的文件的内容是

<VirtualHost *:80>
    ServerAdmin jd@neongecko.com

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </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 ${APACHE_LOG_DIR}/error.log

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

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    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>

    # See 
    # http://www.modrails.com/documentation/Users%20guide%20Apache.html 
    # for details on what these options do.  They will lead to an increase
    # in memory usage, but significantly reduced access times.


    # Speeds up spawn time tremendously -- if your app is compatible. 
    # RMagick seems to be incompatible with smart spawning
    PassengerSpawnMethod smart


    # Keep the application instances alive longer. Default is 300 (seconds)
    PassengerPoolIdleTime 300


    # Additionally keep a copy of the Rails framework in memory. If you're 
    # using multiple apps on the same version of Rails, this will speed up
    # the creation of new RailsAppSpawners. This isn't necessary if you're
    # only running one or 2 applications, or if your applications use
    # different versions of Rails.
    RailsFrameworkSpawnerIdleTime 0

    # Just in case you're leaking memory, restart a listener 
    # after processing 5000 requests
    PassengerMaxRequests 5000


    # Only check for restart.txt et al up to once every 5 seconds, 
    # instead of once per processed request
    PassengerStatThrottleRate 5

    # Specify the minimum number of instances passenger can keep
    # while cleaning idle instances
    PassengerMinInstances 3

    <Location /redmine>
        Options Indexes -ExecCGI FollowSymLinks -MultiViews
        # AllowOverride None
        Order allow,deny
        Allow from all

        # mod_rails
        # PassengerUser redmine
        #RailsEnv edoceo_live
        RailsBaseURI /redmine

        # environment.rb
        # Redmine::Utils::relative_url_root = "/redmine"    
    </Location>

</VirtualHost>

# Then after the virtualhost is loaded, send it a request
# to initialize the redmine installation
PassengerPreStart http://2222.us/redmine/

它应该可以工作,但不是吗?有人可以建议吗?

【问题讨论】:

    标签: apache localhost redmine


    【解决方案1】:

    天哪,我傻了,我用错了ip.....

    【讨论】:

    • 我有它加上一个封闭的端口 3000,然后发现它只能在 localhost 上使用,并且需要 -b xx.xx.xx.xx 和 IP ...但这点燃了“ ip”并且我使用 netstat -plnt 来证明它正在监听,这让我看到它正在监听 127.0.0.1,因此可以通过本地 wget 获得,但不能在服务器之外。从那里开始,只有几个 Duhs。
    • 有趣的是,这些年来这件事是如何出现的,很高兴你也明白了
    【解决方案2】:

    您可能在这里遇到防火墙问题,或者您更可能需要在路由器上设置端口转发,以将端口 80 上的流量转发到您的 linux 机器。

    【讨论】:

    • 我一直在使用错误的 IP,我向 google 询问了我的 IP,而我应该运行 ifconfig 并得到它告诉我的信息。
    猜你喜欢
    • 2021-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-09
    • 1970-01-01
    • 1970-01-01
    • 2013-01-14
    相关资源
    最近更新 更多