How to host a website when th edomain is not registered

Discussion in 'Installation/Configuration' started by smokinjo, Jan 30, 2020.

  1. smokinjo

    smokinjo Member

    Hello,
    I want to start development on a new website, but I want to register the site later.
    How can I set up a new domain, but it is available internally only? I am working inside the ISPConfig network.
    I am asking here because after trying a few key words, I am not sure what this would be called, s I turned to the forums.
    Thanks for any ideas.
    Joseph
     
  2. Th0m

    Th0m Member HowtoForge Supporter

    ISPC -> System -> Server config -> Hostname server -> Website auto alias: web[website_id].preview.providerdomain.tld
    You can use these variables: [client_id], [client_username], [website_id], [website_domain]
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. Th0m

    Th0m Member HowtoForge Supporter

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That's right, if you have client's then that's indeed a thing that needs to be considered. The con of using the auto alias is that some cms like WP do auto redirects to the main domain, you can't setup the main domain in the cms at that stage which means that you can then use the dev domain in the cms and ispconfig right away and change it on publishing without the need of an auto alias or the hosts file.
     
    Th0m likes this.
  6. smokinjo

    smokinjo Member

    Thanks for both of your replies and ideas.

    For the time being, this is not for someone outside our organization. It is an internal project. In addition, as Till eluded to, my roject, being a wordpress project, would be affected if I use the idea proposed by ThOm.

    I will try modifying the hosts file and see if it works.
    I'll come back with any comments or questions.

    Thanks

    Joseph
     
  7. Steini86

    Steini86 Active Member

    If it is in your local network, and you have access to the local dns resolver, you can add the domain there. Then it would be available for all the computers in this network.
    Don't forget to remove the entry in the hosts file when you go live ;-)
     
  8. smokinjo

    smokinjo Member

    Hello,
    I tried the DNS resolver idea and it worked, kind of.
    First I will tell you what I am trying to do, and it might, or might not affect things. I say thins, because Til mentioned that Word press acts in a funny way and using a DNS resolver, would not work well with it.

    I am trying to install friendica. www . freiendi . ca
    (sorry I separated the domain name, but the site would not let me post a link in my message)

    I created a new domain name and DB in ISPCOnfig. I added the domain to the DNS Resolver in PFSense. I did not turn on Lets Encrypt, but I would if I was running a regular site, exposed to the internet.

    After, I go through the normal things like upload the files to the server, run the install script, fix permissions where needed, and the install procedure worked.

    I then proceed to log in to the site, create an account and browse around. All works as much as a bare, empty system works in the beginning.

    I leave, as I have other things to do that day.

    I come back, and when I go to the main page to log in, the main page of another site hosted on the server is displayed, using HTTPS. I did not ask for HTTPS. If I remove the "S", it goes to the site I want, but there is no formatting and no images.

    Why might I be getting the other websites main page?

    Thanks
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Use Internet Search Engines, for example with
    Code:
    site:howtoforge.com wrong site shown website
     
  10. smokinjo

    smokinjo Member

    Thanks for the page. This seems ot be what I needed.

    I saw Tills list of three things to do:
    1) Ensure that you do not mix * and IP address in websites, use either * or the IP for all sites.
    2) When you use SSL, then ensure that all sites on the same Ip use SSL.
    3) Create a default site. e.g. 000default.tld should work as domain name.


    1 - what is the * and IP refering to?
    2 - This means that all sites need to be using SSL, I presume?
    3 - I can make the described default site. I can create the domain: 000default.tld But, how does the server know that it is the default one? There is a setting?

    How do I deal with a website that does not have a registered domain? I use DNS resolver to allow it to be seen internally? Do I just make a temporary self sign certificate?

    Thanks

    Joseph
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The IPv4 field of the website.

    No. It means that when you access a website by https that has no https then you will get the content of another website which is on the same IP. So eithet don't hsuie https for a site that has no https or use different IP's for ssl and non ssl sites or enable ssl for all sites. as web browsers warn these days when a site has no ssl, it makes not much sense to still have sites without ssl, at least if its not just a home network or intranet.

    Because of its name being first in alphabetical order.
     
  12. smokinjo

    smokinjo Member

    Thanks Till. Things are getting more clear!
    For the IP4, mine were nver selected, so thay stayed int eh default "*" setting.

    My question: why would you need the IP? My guess is if you have multple servers and this allows you to assign which physical server will be used to host the web domain.

    For the default domain where a web request would go if the site does not exist, I will use your suggested idea. It is an aplphabetical order,orm what I understand.
    But, in a previous message fore another thread, you said:
    "You shall not create an LE SSL cert for the dummy site, you shall create a normal one on the SSL tab."
    So, for my dummy site, I can just make up a SSL(self signed), and should NOT use LE SSL?


    You comment about a request for a SSL site that is not set up as HTTPS, will fall on the dummy site. Understood.
    So, if my website is exposed, just select LE SSL and it will be set up. All calls for the website will be asnwered with the right web page. If I recall, there is a way to force a HTTP call to be answered as HTTPS usign a setting in ISPConfig.

    Thanks for all your asistance

    Joseph
     
    Last edited: Feb 10, 2020
  13. smokinjo

    smokinjo Member

    I experimented a little after writing my post.
    I was able to get my intranet site working fine. But, a littl ebackwards to what I expected.
    I created a SSL certificate with ISPConfig.
    I turned on SSL for the website in question.

    I looked for th eweb page and it showed up (I did not specificy HTTP or HTTPS, so it fell upon the HTTP version. It works fine.
    But, when I try to use the HTTPS, I get the website, but the formatting is al off. The text, fields and images are all off to the left.

    I am making progress. I will try it on a regular registered domain.
     
  14. Steini86

    Steini86 Active Member

    Usually, if you access a site securely (https), no non-secure parts are loaded. So if you have for example your stylesheet/pictures hardcoded with a http address, they will not be loaded and your site looks strange. You can see this in the development console of your browser. For Chrome under View->Developer. There should be an error, mentioning the problem
     

Share This Page