something wrong on my configuration

Discussion in 'Installation/Configuration' started by rodinux, Apr 5, 2023.

  1. rodinux

    rodinux New Member

    Hello,
    I am working to put in place an the ispconfig and yesterday we wanted to change the hostname and the domain name... So I have do few steps to get it working as needed, change all the entries in the files to replace...
    Also, as I wanted to keep back an ssl letsencrypt, I use certbot to have a certificate, erase older entries cert.pem and cert.key from the older domain.
    Put the correct path on the apache.conf for the new certificate with new domain.
    Well I also have to change an entry ns for 2 sites created, etc....
    But I still have a similar problem as this post: urgently-help-test-page-on-the-main-domain
    Something must be wrong, the page of the ispconfig.domain without ther port 8080 redirect on an Apache page, and with https to a site created
     
  2. rodinux

    rodinux New Member

    Code:
    # apachectl -S
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    VirtualHost configuration:
    *:8081                 hostname.ispconf.domain.tld (/etc/apache2/sites-enabled/000-apps.vhost:9)
    *:8080                 hostname.ispconf.domain.tld (/etc/apache2/sites-enabled/000-ispconfig.vhost:9)
    *:80                   is a NameVirtualHost
             default server hostname.ispconf.domain.tld (/etc/apache2/sites-enabled/000-default.conf:1)
             port 80 namevhost hostname.ispconf.domain.tld (/etc/apache2/sites-enabled/000-default.conf:1)
             port 80 namevhost domain2-foo.com (/etc/apache2/sites-enabled/100-domain2-foo.com.vhost:7)
                     alias www.domain2-foo.com
             port 80 namevhost domain1-foo.fr (/etc/apache2/sites-enabled/100-domain1-foo.fr.vhost:7)
                     alias www.domain1-foo.fr
    *:443                  is a NameVirtualHost
             default server domain2-foo.com (/etc/apache2/sites-enabled/100-domain2-foo.com.vhost:134)
             port 443 namevhost domain2-foo.com (/etc/apache2/sites-enabled/100-domain2-foo.com.vhost:134)
                     alias www.domain2-foo.com
             port 443 namevhost domain1-foo.fr (/etc/apache2/sites-enabled/100-domain-foo.fr.vhost:129)
                     alias www.domain1-foo.fr
    ServerRoot: "/etc/apache2"
    Main DocumentRoot: "/var/www/html"
    Main ErrorLog: "/var/log/apache2/error.log"
    Mutex default: dir="/var/run/apache2/" mechanism=default
    Mutex fcgid-pipe: using_defaults
    Mutex authdigest-opaque: using_defaults
    Mutex watchdog-callback: using_defaults
    Mutex rewrite-map: using_defaults
    Mutex ssl-stapling-refresh: using_defaults
    Mutex authdigest-client: using_defaults
    Mutex fcgid-proctbl: using_defaults
    Mutex ssl-stapling: using_defaults
    Mutex proxy: using_defaults
    Mutex ssl-cache: using_defaults
    PidFile: "/var/run/apache2/apache2.pid"
    Define: DUMP_VHOSTS
    Define: DUMP_RUN_CFG
    Define: ENABLE_USR_LIB_CGI_BIN
    User: name="www-data" id=33
    Group: name="www-data" id=33
    
     
  3. rodinux

    rodinux New Member

    On the domain ispconf.domain.tld I have an apache text (the /var/www//html/index.html). If I try https:// ispconf.domain.tld, the site is not secure and accepting the risk I get the domain2-foo.com page !!

    Perhaps I need also have a vhost for the main ispconfig domain? Or do update.sh ??
     
  4. rodinux

    rodinux New Member

    Or I have to edit the file 000-default.conf ?
    Code:
    /etc/apache2/sites-available ] # cat 000-default.conf 
    <VirtualHost *:80>
    	# The ServerName directive sets the request scheme, hostname and port that
    	# the server uses to identify itself. This is used when creating
    	# redirection URLs. In the context of virtual hosts, the ServerName
    	# specifies what hostname must appear in the request's Host: header to
    	# match this virtual host. For the default virtual host (this file) this
    	# value is not decisive as it is used as a last resort host regardless.
    	# However, you must set it for any further virtual host explicitly.
    	#ServerName www.example.com
    
    	ServerAdmin webmaster@localhost
    	DocumentRoot /var/www/html
    
    	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    	# error, crit, alert, emerg.
    	# It is also possible to configure the loglevel for particular
    	# modules, e.g.
    	#LogLevel info ssl:warn
    
    	ErrorLog ${APACHE_LOG_DIR}/error.log
    	CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    	# For most configuration files from conf-available/, which are
    	# enabled or disabled at a global level, it is possible to
    	# include a line for only one particular virtual host. For example the
    	# following line enables the CGI configuration for this host only
    	# after it has been globally disabled with "a2disconf".
    	#Include conf-available/serve-cgi-bin.conf
    </VirtualHost>
    
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  6. rodinux

    rodinux New Member

    Ok, thanks, I have updated the ISP with the script `ispconfig_update.sh` and renew the certificate with certbot, also I have create the domainname.tld to redirect him to domainname.tld:8080.
    Now I am hurry with creating a new site and checking auto subdomain www. does not work... the site is created but not the www.
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Which part does not work?
    Have you created in DNS entry for the www. subdomain?
     
  8. rodinux

    rodinux New Member

    No we haven't create DNS entries. I need create DNS ?
     
  9. rodinux

    rodinux New Member

    It seems logical.. Does we each time a site is created, also add dns entries ?
    It is not a domain from a Registar, it is created from ispconfig...
     
    Last edited: Apr 6, 2023
  10. rodinux

    rodinux New Member

  11. rodinux

    rodinux New Member

    Perhaps not a good idea... I thought the auto subdomain www. could work...
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to reach a domain name (or a subdomain) on the internet, you need DNS records. These are basics and not ISPConfig-related or specific in any way. Maybe you should consider just renting a website at one of the big providers instead of running your own system. Or take some classes and learn the basics first.
     
  13. rodinux

    rodinux New Member

    does we need create dns entries for each site created ? Is it avalaible have few sites created with differents domain names pointing with the dns of the server ?
     
  14. rodinux

    rodinux New Member

    We could create sites on the ISPconfig and they works, we also put a wordpress and working on this.
    We want have few sites working with the ISPconfig. We have yet 2 sites with domain names configured from a registar.
    Does every sites created need also to buy domain name ?
    Why creating a site works, but not the auto www.
    Can we just add a zone dns on our ispconfig for the new domains or we have to buy a domain name on a registar each time ?
    We have buy the docimentation so I try read it.
    I even do a lot of administration system, I am not really a newbie.
    Sorry for my bad english.
     
  15. rodinux

    rodinux New Member

    What I understand (or not)
    if I try a site configured on the ispconfig wich have a registar, all works fine

    Code:
    ~$ host domain1-foo.com XXX.XX.XX.XX
    Using domain server:
    Name: XXX.XX.XX.XX
    Address: XXX.XX.XX.XX#53
    Aliases:
    
    domain1-foo.com has address XXX.XX.XX.XX
    domain1-foo.com mail is handled by 10 mail.domain1-foo.com.
    
    The site for ispconfig is called console.otherdomain.tld, but here it is not as excepted
    Code:
    host console.otherdomain.tld XXX.XX.XX.XX
    Using domain server:
    Name: XXX.XX.XX.XX
    Address: XXX.XX.XX.XX#53
    Aliases:
    
    Host console.otherdomain.tld not found: 5(REFUSED)
    
    also for the others domains created...

    otherdomains.tld is also used for few others sites with subdomains on others machines, other places (a Yunohost and others dockers applications differents Ips)
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you did not create a DNS A-Record for the www subdomain on the DNS server that is authoritative for this domain (zone) and pointed it to the web server.

    DNS records have to be created on the DNS server that is authoritative for a domain, this can be the DNS server of your provider or it can be the ISPConfig server. That's what I referred to at learning the basics first. This is all not related to ISPConfig. That's the basics about how the internet works and applies to any server or control panel similarly. A domain must also not be an officially registered domain, you can use your own internal TLD, but in such a case the zones must be configured in the hosts file of the clients or the DNS server used by the clients for resolving domains must contain these private domains.

    You also missed creating a DNS record for the console subdomain. You can not expect subdomains to be reachable when you missed creating DNS records for them on the right server.
     
  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My signature has link to DNS setup on ISPConfig, it has some info on registering the domain, too, and on troubleshooting name service.
    It seems to me you should read for example https://en.wikipedia.org/wiki/Domain_Name_System .
    If you try to reach a website with name something.domain.tld, that name must be resolvable from name service.
    You can test your website is working before name service is set up using this method: https://www.faqforge.com/windows/how-to-access-a-namebased-website-without-a-dns-record/
     

Share This Page