Search code examples
localhugostatic-sitelaragon

How to serve hugo in a specifc domain?


I installed Hugo on laragon in local. I put it in a path localhost/hugosite. When i run "hugo serve" the site is visible in localhost:1313 but i want to show it in "localhost/hugosite". How can i do that? I tried changing the base url in config but nothing seems happened.


Solution

  • You can specify the default HTTP port (80) via -p option.

    $ hugo server -b http://localhost/hugosite -p 80