Looking for a (httpd like) way/server to access static files (html/images etc) from my windows pc using http - html

I have a static html project which contains some files I want to have access to using my cell phones or laptop's internet browser.
The concept is I have a folder in my pc which contains the files.
I would hit my computer's IP through the web browser of my laptop
(like http://192.168.1.5/myProject/index.html)
and then a server (like apache httpd works for redirecting to servers) would return me the wanted file.
NOTES:
-It should be EASY and FAST to install and Configure.
Any suggestions? Most acceptable answers are for Windows and then I accept for mac!

Have you tried xampp for an apache server? There is a portable app version as well.
Also iisexpress is a nice standalone version of IIS that runs under current user profile. Not sure if there are any limitations w the bindings tho.

Related

I built my Unity on HTML5 WebGL and this error message shows up when I try to launch it

Unable to parse Build/Pain.framework.js.br! Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option.
Monopoly A3
The message is pretty self-explanatory: you'll need a local server to do that. They're countless ways to do that but here's one of them:
XAMPP
Just download it and run it (The XAMPP Control Panel - Apache -> Start). Then put your files in C:\xampp\htdocs\ (On Windows, not sure for other systems).
C:\xampp\htdocs\ Will be the equivalent of http://localhost in your browser, so if you put example.txt in C:\xampp\htdocs\, it will be available at http://localhost/example.txt.
Other options
XAMPP is my personal favorite, but they're other options, like the other *AMP, like WAMP, MAMP and LAMP, for Windows, MacOS, and Linux respectively (XAMPP being multiplatform - Also more exist is you're curious).
They're also "simpler" solution (in the sense of more lightweight ones) like http-server for NodeJS, or Python's http.server. But they need to be executed on the right folder each time. Both solutions works fine so it's up to you to choose your preferred.

How to Automatic Update The Website Which is Hosted in Raspberry Pi Using Git?

Concept :
=>I have raspberry pi 3 B+ and installed apache2 web server which is running on port:80.
=>In /var/www/html/A/* here my lite weight website hosted.
=>I am able to access this website by typing "192.168.1.1:80" in chrome web browser.
Requirement :
I want to run a abc.py file from the html page which is running on
web browser.
How to handle the condition-
a. at the time of cloning the internet connection is lost
b. at the time of cloning the device suddenly switched off.
How to recover the code when raspberry pi again boot and internet connection is not available.
Is there any other secure and safe alternative for these functionalities ?
By using the PHP and cgi-bin i am able to run the python script from the ui button click.

Is it possible to run polymer locally?

Might be a very stupid question, but right now I'm running a project using Polymer-Project elements on a remote server.
I'm going to be away from network for a while, but I still want to work on this project offline. However, I can't get it running locally on a windows machine, even though all the dependencies are CSS/HTML/JS. Is there something I'm missing? All the paths are relative, and I double-checked them just in case.
Yes, it's possible.
You only need to have a web server running on your computer, as Polymer pages must be served from a web server.
Apache, ISS, Nginx or other HTTP servers will work; If you have no server in your computer, you need to follow the instructions in https://www.polymer-project.org/docs/start/tutorial/intro.html to start a quick Pyhton HTTP server.
Yes it is possible. You just need a local web server.
For Mac/Linux,
Python comes generally pre-installed. Hence, you can directly start a web server from any directory using,
python -m SimpleHTTPServer
If python is not available, then you can install MAMP for Mac and XAMPP for Linux system to start a local web server.
For Windows,
You've got WAMP that does the same thing for windows.
For a lightweight static web server, you could use Mongoose that runs on all three platforms mentioned above.

Building a web page without having internet access

I want to build a web site using my laptop in areas where I often do not have internet access - no active browser. How do I check my pages to see how things are going without a browser?
Just drag-and-drop the .html file into your favourite web-browser. It should open up with the "file:///" protocol automatically.
You should always have a local web server installed on your machine for development.
For example, Mac OSX comes with Apache pre-installed. You might have to activate it. You can also install a server language like PHP or Python. Again, OSX comes with those pre-installed, might just need activation. Google how to set up a local server on the type of OS you have.
You should try to replicate the type of server setup you will be using in production.
That will permit you to code locally and test in your browser.
You should also use some kind of versioning system like Git. So, you code on your local machine, then you can push your code to the cloud once in a while for backup. When you're ready, upload your code to the production server and try it out.

Hosting web app on xampp

*I hav made a small demo web app(using html5, and jquery mobile)
*I have installed and set up Xampp
*set passwords for local server
* I am confused as in what to do next, where do i store my .html files and other resources
*I need to test my app on a network
*I want to set up a database using xampp ,(i have no idea how to)
*edit: since its a mobile web app, i want to test it from my mobile, is it possible by hosting it on my pc ? If yes, then how?
If you have the apache server running on xampp, you have to put the files in the /htdocs map. This is usually located in something like C:/xampp/htdocs. Then you go to your localhost in your browsers, so localhost and then /example.html.
This would be for example localhost/example.html, this would redirect to the example.html file in the htdocs folder.
Then if you want to set up an mySQL database you should take a look around at localhost/phpmyadmin