terreng / simple-web-server

Create a local web server in just a few clicks with an easy to use interface. Built with Electron.
https://simplewebserver.org
MIT License
239 stars 65 forks source link

Axure multi-project preview #212

Open SONGjiemo opened 1 month ago

SONGjiemo commented 1 month ago

The company has multiple projects and wants to support a single port that supports multiple HTML project previews for Axure. Instead of one port for one axure html project

cause The company needs to set up an AXURE HTML project platform using a single port. Upload multiple HTML folders to generate different address links. Currently one html folder per port. Since there are many projects, it is necessary to support one port to support multiple html folder uploads, so that it is easy to manage and add project links.

ethanaobrien commented 1 month ago

Hello! Thank you for using simple web server!

Could you please elaborate on what you’re trying to do? If I understand correctly you want multiple folders to be able to have organization when uploading files. This can be done by creating a sub directory.

If your server should always have a directory listing, make sure the option to render index.html is disabled.

If you’re looking to use this as a “reverse proxy”, where you can expose one port and use the host name to determine which site to render, that’s not something this application is intended for. I’d recommend looking into using something like the nginx proxy manager if this is your use case

SONGjiemo commented 1 month ago

Hello! Thank you for using simple web server!

Could you please elaborate on what you’re trying to do? If I understand correctly you want multiple folders to be able to have organization when uploading files. This can be done by creating a sub directory.

If your server should always have a directory listing, make sure the option to render index.html is disabled.

If you’re looking to use this as a “reverse proxy”, where you can expose one port and use the host name to determine which site to render, that’s not something this application is intended for. I’d recommend looking into using something like the nginx proxy manager if this is your use case

Question 1 The memory is too large, and hopefully a way can be provided. Make the memory footprint a little smaller. The memory of the company's servers is relatively small.

Question 2 Access the password, preview the html address, and avoid the individual deleting part of the address to see the project homepage. Leaked the issue of the entire project. Current situation: Both the homepage and HTML require a password if you add it. I need to add a password to the homepage so that the html project can be seen publicly.

terreng commented 1 month ago

Simple Web Server isn't designed to run on a server. If memory is an issue then I highly recommend using something else instead.

We don't support adding a password to only some directories but not others. That is outside the scope of this program.

ethanaobrien commented 1 month ago

It is technically possible using swsaccess, though child directories would not be affected

https://simplewebserver.org/docs/swsaccess.html#_401-example