• Networking
  • How to make my apache server live or public

SO i installed xampp which includes the apache software, when i first installed it, i wanted to use it as a home server to sync photos and videos between my pc and my sister's pc.
Now i want to make it public, so that anyone can access it from the internet, i have a tplinlk TL-WR841N router, it has that green interface and pretty much the same software as other tplink routers, what shall i do?
I have configured my router to assign 192.168.1.100 to my computer's MAC address, so it is permanent. But what address shall i use to access my computer from the internet?
Note: My isp uses a shared ip, so it's gonna be complicated i think.
Any advice will be appreciated,
Thanks in advance.
I don't think lebanese internet is powerful enough to run a public server.
NuclearVision wroteNote: My isp uses a shared ip, so it's gonna be complicated i think.
Yes, your server will need to be accessible from a public IP. The only option I can think of is somehow create a tunnel from your PC to a server on the internet.
I have a VPN (Ubuntu Linux) so if you figure out what tunneling software to install and if it's not too much work for me, I can install it on the VPS and you can use it as public endpoint.
I think this will require quite some time. I remember that tunneling setups on linux aren't very user-friendly, and once it works you'll probably be deceived at the speed it will run at. Your upload speed will be the maximum speed at which your server will serve content.
If you're serious about hosting a server, I think the best option is a VPS, you can get one at $20/month. If you only need a web server, you can also use shared hosting which is cheaper and easier to setup. Then you can sync your content using FTP.
@rolf yea I thought about a vps too, but I hate uploading files you know, I want to place my files in the public folder and make them online. So what are my chances?
Do you mean I need Ubuntu server or windows server, because I thought I just need some dns configuration.
Why don't you buy a cheap hosting $1 a month :) ?

It will be much easier!
@theilluminative, thanks man, but as i said i don't want to upload my files to my hosted site. If i have my home server i can just copy files - paste them in apache folder, and voilĂ  they're online, no upload required...
you realize that hosting your site on your pc is very very bad idea, don't you? and i'm not just talking about security here, you know that every time you turn off your pc your site will be down, and keeping your pc turned on is a bad bad idea, so you're gonna have at least 8h of down time per day.

if you hate uploading using the traditional method i suggest using dropbox to upload the folders, it's a desktop app, drag and drop in a very neat way, you can upload your stuff to your server using that, if you're interested i'll tell you how to set it up or just google it, i use it to upload some of my django projects
Fischer wrotekeeping your pc turned on is a bad bad idea, so you're gonna have at least 8h of down time per day.
What? Why? I kept my PC on 24/7, when I had a UPS. Now I have to take electricity cuts into account. And even then they only last for a minute.
But the visitors will download your photos. So you'll waste your bandwidth.
simply you cant, you need dedicated ip which no one give it to you, the one you pay for additional fees so they give a fixed ip its not really a fixed ip (public ip).

More explanation: Public ip is the one you rent online so that anyone could write this ip on the url and it will automatically go to your site. This doesn't work on shared servers... To put it in other words you cant in lebanon to have a dedicated ip unless you pay for it, the price ? i don't know i think its pointless.

You may be able to do it if you talk to your isp and let them know that you want them to port-forward for example 36363 to your fixed ip and you will pay for it too.

Its not about your pc, see if your not familiar with ip address you wont get it. Try to read more over the internet for more explanation.
@yasamoka you could do that but it's not recommended, you may burn up some power supplies by leaving it turned on at all time, shutting it off when you don't need it will let the cpu cool down and laptops that are tuned on all times are dustier.

we could argue on this subject, i'm not going to argue with anyone because the admins here love to close topics for the silliest reasons, i gave my point of view and you gave yours, this subject has been discussed on many forums out there and there are many opinions, i'm against leaving my pc turned on 24/7

just to be on the safe side nuclearvision, if you insist to host your site on your pc, then use an old computer that you don't use, you won't cry if something went bad

one more thing, to those who which to host their sites on their pc, use nginx or light httpd, lighter than apache, i don't know what's the big deal about apache anyway, i like nginx

oh one last note i agree with what thestunman said
NuclearVision wrote@rolf yea I thought about a vps too, but I hate uploading files you know
Why is that?
Just to answer exactly question asked:
Ways are multiple:
1)Ask ISP for real IP. Still you have to pass hassle of forwarding port on router, but good thing to learn how it works.
2)Get real ip over some VPN server. But it will cost you more monthly than shared hosting. You will get real ip directly on your PC, when you will establish VPN connection.

Remember electricity, bandwidth are MUCH more bad(unreliable) and expensive in Lebanon, than outside. So as a proof of concept you can use my suggestion, for anything more serious than putting small files and having fun, consider hosting.
Don't Forget that your upload speed is limited, so when only 2 users download simultaneously from your site, you will face a big trouble.
@amkahal Me and my friend will be only using it to sync some small files, it's more convenient than file hosting on sites like mediafire. So upload speed is not a problem.
@Nuclearcat thanks man, i will be hosting some small files, just for fun, exactly like you said.
What is real ip?
@rolf I just hate uploading files.
@opeth thanks for your suggestion, i've been using dropbox and ubuntu one for a year now. I want to learn something new.
TheStunMan wrotesimply you cant, you need dedicated ip which no one give it to you, the one you pay for additional fees so they give a fixed ip its not really a fixed ip (public ip).
It is a dynamic real IP, meaning it is assigned from a pool of real IPs. It changes every time one restarts the model. You need a Dynamic DNS hostname service. I'm familiar with this.
More explanation: Public ip is the one you rent online so that anyone could write this ip on the url and it will automatically go to your site. This doesn't work on shared servers... To put it in other words you cant in lebanon to have a dedicated ip unless you pay for it, the price ? i don't know i think its pointless.
True that.
You may be able to do it if you talk to your isp and let them know that you want them to port-forward for example 36363 to your fixed ip and you will pay for it too.
Yes, an ISP will modify his routing protocols if you have a gaming issue, let's say. If you want additional services to become available by port-forwarding, you have to pay up.
Its not about your pc, see if your not familiar with ip address you wont get it. Try to read more over the internet for more explanation.
I am discussing the issue of why it is not favorable to host on your PC itself. I am not discussing the issue of what crappy internet services are available in Lebanon that allow us to host websites and such.
Fischer wrote@yasamoka you could do that but it's not recommended, you may burn up some power supplies by leaving it turned on at all time, shutting it off when you don't need it will let the cpu cool down and laptops that are tuned on all times are dustier.
Burning up power supplies? Not when you have quality power supplies. Quality PSUs are rated a MTBF of 100k hrs. @ 70% load (@50C I think). They're very efficient too. My Corsair HX850 is 91% efficient at 50% load, newer PSUs reach 94% like the Enermax Platinum. I wasn't talking about laptop here. Although it's possible with laptops, they are more feeble, especially their PSUs. Desktops that have fan filters avoid the dust issue. All you need is good pressure intake fans. Problem solved. CPU cooling down? Not when you have good cooling as well. I've been running the Folding@Home project 24/7 for about 2 years now on CPU (Core i7 930 @3.61GHz) and GPU (GTX260 @729/1458/999). My temperatures do not break 70C in the summer. My system is pretty quiet, even in the summer. (2 x 120mm + 230mm intakes, 1 x 120mm exhaust + 1 x 200mm exhaust, dual 120mm fan push-pull on a Thermalright Venomous X). I use Scythe S-Flex fans (SFF21G) and Arctic MX-4 thermal paste, everywhere. (Note that I'm not giving you these examples for e-peen, I'm just showing you it can be done when you get good hardware in place).
Fischer wrotewe could argue on this subject, i'm not going to argue with anyone because the admins here love to close topics for the silliest reasons, i gave my point of view and you gave yours, this subject has been discussed on many forums out there and there are many opinions, i'm against leaving my pc turned on 24/7
We are not arguing, we are discussing. Only one of these can be true at a time:
1) It's OK to leave a PC turned on 24/7
2) It's not OK to leave a PC turned on 24/7
Don't assume that I'll argue like a kid if somebody disagrees with me. Almost everybody disagrees with me anyways. And I totally respect your opinion.

Oh and don't bash the moderators every time you get a chance too. It's not nice. They're the reason these forums are that organized. LebGeeks is more orderly than any other forum I've seen on the internet. Yet we do get work done, and progress.


@nuclearcat: Definitely. 100%
NuclearVision wrote@rolf I just hate uploading files.
Then you're gonna love spending days setting this up, then watching dowloads top 15KB/s, with a single user, and bad latency and reliability.

PS: anyway setting up a Linux VPS is not much easier. You'll have to spend weeks, not days, learning how to use Linux.

In any case, good luck :)
Tarek wrotedynamic dns :)
Useless without public IP