You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Bitnami配置主域名及子域名访问失败排查求助

Hey there, let's break down your issues step by step since you're new to Bitnami and Apache—no worries, we'll get this sorted!

1. Fix the DNS_PROBE_FINISHED_NXDOMAIN Errors (example.com & app1.example.com)

First off, this error has nothing to do with your Apache configuration right now—it means your browser can't find the IP address linked to those two domains. Here's what to check:

  • Double-check your A records: Log into your DNS provider's dashboard and confirm that both example.com and app1.example.com have A records pointing to your server's public IP address (not the internal/private IP). It's easy to accidentally paste the wrong IP here!
  • Wait for DNS propagation: DNS changes can take anywhere from 15 minutes to 24 hours to fully roll out, depending on the TTL (Time to Live) setting of your records. Test the resolution directly from your terminal to see if it's working:
    nslookup example.com
    dig app1.example.com
    
    If these commands return your server's public IP, the DNS is starting to work. If not, give it more time or double-check your record setup.
  • Clear local browser/DNS cache: Your browser might be holding onto old DNS data. Force-refresh the page with Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac), or flush your local DNS cache (steps vary by OS).

2. Confirm Apache Configuration & Permissions

Your updated bitnami.conf fixed the 403 error for app2, which means you got the directory permissions and virtual host structure right. Let's make sure the other domains are set up the same way:

  • Restart Apache after config changes: Any edits to Apache config files require a restart to take effect. In Bitnami, use this command:
    sudo /opt/bitnami/ctlscript.sh restart apache
    
  • Verify directory permissions: Even though app2 works, double-check that default_website and app1_website have the same ownership and permissions as app2. Bitnami's Apache runs as the daemon user, so run these commands:
    sudo chown -R daemon:daemon /opt/bitnami/apache2/htdocs/default_website
    sudo chmod -R 755 /opt/bitnami/apache2/htdocs/default_website
    
    Repeat the same commands for app1_website.
  • Check for conflicting config files: Bitnami often stores additional virtual host files in /opt/bitnami/apache2/conf/vhosts/. Make sure none of these files are overriding the settings in your bitnami.conf.

3. Test Locally on the Server (Rule Out Network Issues)

To confirm your Apache config is actually working for all domains, test directly from the server itself:

  • Edit the server's /etc/hosts file to map the domains to localhost:
    127.0.0.1 example.com
    127.0.0.1 app1.example.com
    127.0.0.1 app2.example.com
    
  • Use curl to fetch each site:
    curl http://example.com
    curl http://app1.example.com
    
    If you see the correct <h> tag content for each, your Apache config is perfect—all remaining issues are DNS-related.

Quick Summary

The fact that app2 works confirms your Apache virtual host and permission setup is valid. The main problem with example.com and app1.example.com is almost certainly DNS resolution (either incorrect records or propagation delays). Fix that, and you should have all three sites up and running!

内容的提问来源于stack exchange,提问作者Anirudh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 06:37:59