How to redirect a university personal webpage to an internal ip - html

We have a webserver managed by our department and each of us have a personal web space url like:
http://students.university.edu/myusername (1)
we can access to our webfiles folder and edit index.html and have other data. I think we also have php server installed with our department webserver so we can also make a php website.
But I want to setup a webserver on my machine in my lab and redirect any access to my personal webspace above (1) from any external client anywhere around the world to my webserver on my local machine. In other words I don't want to use the webserver managed by our department IT because basically I need access to my files on my computer. And as you may notice my machine's ip is local in our infrastructure and invisible from outside. Is there any suggestions?

found this article that says in the .htacces file on your server, add
order deny,allow
deny from all
allow from 192.168.0.0/24
that should block everyone but the people on ips 192.168.0.0 through 192.168.0.24
of course if u dont have the .htacces file, which you should, you have to create the file in text editor, just calling it .htaccess with no extension
hope this helps

Related

Local images in HTML

I'm an high school student and I'm working on something for fun. I've linked a local file stored on my computer to my webpage. What can I do to make it possible for other devices to access the local html file? (meme1.html)
<div id="button">
<a href="C:\Users\Desktop\MEME GENERATOR\meme1.html">
<img src="https://openclipart.org/image/2400px/svg_to_png/140365/1306313012.png" alt="Click here!" height="20%" width="20%"></a>
</div>
<div id="wrapper">
<h1><span class="tight-2">Happy Birthday!</h1>
<h2>Go ahead, press the button to generate memes!<span class="tm">™</span>.</h2>
</div>
Basically, when you host the site online you have to change the linked file path to the one of the server instead of your local machine.
Edit: If youre using plain HTML my answer stands, if you use a backend platform like Django, Flask or dotNet Core then the urls are dynamicly stated in your webapp.
By default, the local file is only available to the system it resides on. For instance this link you've created:
<a href="C:\Users\Desktop\MEME GENERATOR\meme1.html">
is telling the browser to look in the C: drive of the machine it's currently installed on. Every other system in your network (and the world, for that matter) will likely not be to pull that file because MEME GENERATOR isn't a folder on their system, so they will see a 404 (file not found) error.
That said, you can load links within your network by using network addresses. This will be the machine's network IP address, typically starting with 192.168.
That said, in order to load the file, the machine that it is running on will need to have a port open for the client machine's browser to connect to. This is typically port 80, unless SSL is in use, in which case it's typically port 8080, for HTTP traffic.
In doing so, the computer that is serving up the files becomes, logically, a 'server'. And this is the core of the client (user) to server relationship that the whole of the internet and networking is built upon.
Since you're on Windows, you can use something like XAMPP or WAMP to run a server locally that will have Apache installed, which can serve files through these ports. You're going to need to read up on these technologies a lot to get a file going, and be forewarned that this will open your system to hacking and the like.
EDIT: rereading your question, you are maybe trying to get this file to load on your website? If this is the case, then you need to upload the file to your website, and then it will have a folder structure similar to a local Windows file. [YOUR.DOMAIN.COM]/[whatever folder you create on your server in the public directory]/meme1.html
Do you mean? That you want other people to access your website?
Few ways to do that.
One thing you could do is to send the whole directory to the individual to who you want to send the webpage to.
Or the other way is what you can do is host the webpage on a hosting website. There are a lot of hosting websites that would host your websites for free.
That way anyone with a given URL can access the website.

Upload css and html saved in a folder to host server

I'm new to programming generally. I have typed my css and html codes and saved in a folder. How do i upload this site to a host server. Thanks
Welcome.
To upload the files to your hosted server, you would need to use a FTP program ( File Transfer Protocol). A good free one to use would be filezilla, which a quick google search will come up for you.
Once you have downloaded filezilla you will need your server FTP settings, which you can find on your Hosted servers control panel. (They generally get you to create a username and password) you would need the FTP setting and Port with your login details, to be able to log in and start uploading your files.
One thing to be careful of, is the URL links for images/pages etc, as they may be different than if they were on your local machine.
You can use FTP (file transfer protocol) to achieve this. Download a free FTP client such as FileZilla, input your hostname and login information, and then you simply navigate to your desired server location and drag and drop.
You can read more about FTP here
https://en.m.wikipedia.org/wiki/File_Transfer_Protocol
Usually we have FTP (file transfer protocol) to send data to the server.
Softwares like Filezilla, for example, can connect and handle server's directories and files the way you want.
Anyway, you need to check the available services with your hosting service.

Beginner: How do I upload an HTML only site to the web host?

I'm trying to make a simple four page website, all HTML with some CSS and images. This is my first site. After I'm done building the HTML documents, what do I need to upload them and get the site running?
In order to put up a website, you need a web hosting provider. So the first thing you need is a hosting provider. Make sure that your provider offers FTP access to your website. You will need to contact your hosting provider (http://webdesign.about.com/od/webhosting/f/blfaqwebhosting.htm) if you aren't sure.
Once you have a hosting provider, in order to connect by FTP you need some specific information:
your username
password
the host name or URL where you should upload files
your URL or web address (especially if it's different from the host name
You can get this information from your hosting provider if you aren't sure what it is.
Make sure your computer is connected to the internet and that your WiFi is working.
Open an FTP client. As I mentioned above, most computers come with a built-in FTP client, but these tend to be fairly hard to use. It's better to use a visual style editor so you can drag and drop your files from your hard drive to your hosting provider.
Best FTP Clients for Windows
Best FTP Clients for Macintosh
Following the instructions for your client, put in your host name or the URL where you should upload your files.
If you try to connect to your hosting provider, you should be prompted for a username and password. Enter them in.
Switch to the correct directory on your hosting provider.
Select the file or files you want to load onto your website, and drag them to the hosting provider pane in your FTP client.
Visit the website to verify that your files uploaded correctly.
Tips:
Don't forget to transfer images and other multimedia files that are associated with your website, and put them in the correct directories.
It can often be easiest to just select the entire folder and upload all the files and directories at once. Especially if you have fewer than 100 files.
What You Need
FTP client
check this out http://webdesign.about.com/cs/beginninghtml/ht/htupload.htm i hope this could help you

Connecting XAMPP to a domain and adding files

What I need is a web server hosting just for saving large files on it and share it online, so today I downloaded XAMPP Control Panel V3.2.1 as I read on a topic that it can help me.
Actually, I don't have enough knowledge about XAMPP, can I use it to upload files with normal domain(like: www.mydoamin.com/myfile)?, how can I connect the server I build with a domain after purchasing it? and how can I upload files to this domain.
Till now I done all the needed setup, and here's what I get when I start the application:
Also I can use the "MySQL" in the webpage after log-in, and here's how the page looks like:
Is there any recommendation for other application that helps me uploading files to my own domain/server and share it, if this one isn't for these stuff?
XAMPP is software bundle containing cross OS solutions (X) for webserver Apache (A), MySQL database (M), and server-side language PHP (P) and Perl (P).
If you got a domain you need to redirect it to IP on which this XAMPP server works. To do it call/mail your domain registrator (a company that sold you a domain) and ask about it. It involves DNS (Domain Name Server) configuration - ask them how to change DNS to direct it to your XAMPP server.
PS To add files go to htdocs direcotry in your XAMPP instalation or whatever you defined to store files (and websites) and drop your files in there.
As I can see you are not experienced in that kind of things so maybe ask company that sold you a domain name about "shared hosting"? It's preconfigured ready to go server where you send files over FTP

Access of the data by the server on the server machine

My question is I know that a server application can access the data stored at server but cannot access teh data stored at client machine as this is a security issue and Browsers not allow this. But in case of localHost (when my local pc is acting as a server) I should be able to access the files from my PC(the local PC on which the application is running). But that is not happening.
Why i m not able to access a simple image file form my local C:\ drive by localhost. The URL i used was file:///c:/image.png but if i store this image any where under home directory of tomcat i m able to access it. WHY ??
I m using it as <'img src="file:///c:/image.png>
Thanks for any considerations..
The problem is with this part:
The URL i used was file:///c:/image.png but if i store this image any
where under home directory of tomcat i m able to access it.
If you want to access the file through Tomcat after placing it in Tomcat's document-root, then the URL to use (assuming you haven't changed the default port setting) is:
http://localhost:8080/image.png
Content hosted by the web-server needs to be accessed through the web-server. A file:// URL bypasses any sort of server, and basically directs the browser to look directly in the local filesystem. So it should also work if you were to do:
file:///C:/path/to/tomcat/home/image.png
But in that case you are not going through Tomcat. You're just pointing the browser at the tomcat folder in your local filesystem.
Edit: I don't think many browsers will not allow file:// urls in tags in hosted documents. Doing so could cause the appearance of a security hole, as if you could guess the name of an image file on someone's local filesystem you could then post a webpage that made it appear as if your server had somehow grabbed their personal image file.