Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
This is what I learned by doing some searching. These things were taken from many places. Please point out any missing things. (I have not yet tried this out, just want to clarify what I'm going to do)
For hosting I need to have a static IP. But my ISP provide dynamic IPs. So I used DynDNS (as Cuga adviced in this). I belive this will resolve my dynamic IP problem by mapping the domain name I choose with my current(dynmically assigned) actual IP.
Next is setting up my Xampp server. For this I need my computer's local IP which I can get using ipconfig (or ipconfig/all for full details) in Windows command prompt (lets say local IP is 192.168.1.6).Now I have to edit httpd.conf located in xampp/apache/conf folder. "ServerName" field has to be changed to 192.168.1.6:80.
This should allow anyone using the hostname i got from DynDNS to access my computers xampp/htdocs folder.
Please fill me in if there are missing parts.
Now I want to change the port that my clients can connet to my computer and the folder that I am going to host using it.
I know that I have to do protforwarding first and then configure apache to use that port instead of 80. Can someone explain me how to configure apache to use the new port.
And I want my clients who use my hostname I obtained from DynDNS, access some folder only that I specify (ex: xampp/htdocs/public) while I can access any file in xampp/htdocs using http://localhost/... . I think this what virtual hosts do. Can some one tell me how to do this.
Are there any solutions to the security issues that might arise and how to do this minimizing security issues?
Thank you.....
1) if you specify ServerName as 192.168.1.6:80, only people who use this server name will be able to access your machine - those on the outside network will not.you should use *.80
2) to make apache listen on a different port, you need to add "Listen" directive to your httpd.conf. for example
Listen 90
and change ServerName accordingly
3) to let outsiders access only folders you want them to access, you can protect the rest with an .htpasswd. or you'll have to create a separate virtual host.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 months ago.
Improve this question
I created a public SSH key on my local computer and added it to my github account.
Now I want to connect to my server (online) via terminal, in order to clone my git project to the server of my provider.
In an online tutorial to connect they suggest:
ssh root#< IP-ADDRESS OF THE SERVERS>
But in my server settings I can online find the following data:
SSH-Hostname,SSH-Username,SSH-Port,SSH Fingerprint
Is it possible to connect also with Hostname and Username? Because I cannot find the ip address of my provider.
Thank you
This isn't really on topic here (stackoverflow), but I'll put in a quick answer anyway: ssh makes a network connection to an ssh server, therefore ssh needs a network address for the server. This need not be an IP address, except for one other issue, which is that the ssh protocol is defined as a TCP protocol and TCP runs over IP (v4 or v6).
That said, almost all networking systems have a mechanism for translating a host name to a set of addresses (some of which may be IP addresses; others might be XNS or IPX or some such: see What is Address Family?). So you just need user#host, and something—OS and/or library dependent—will look up the proper IP address. You can leave off the user# part in some cases.
If (this is a pretty big "if") your system can't translate the host name to an IP address, or does it incorrectly, then you can resort to a raw IP address. This bypasses the translation step. If you don't trust your translation software, you can do this intentionally.
I have several websites set up on my local XAMPP, and have recently setup virtual hosts so that they can be accessed from my machine using dev.website1.com, dev.website2.com etc.
To achieve this I had to edit my hosts file C:\Windows\System32\drivers\etc\hosts to ensure the name resolves to the correct IP address.
I would now like to make the sites accessible from other computers on the local network, but editing the hosts file for each machine manually seems to be a bad way of doing it, as it would quickly become unmanageable with several machines/addresses to keep on top of.
My question is: Is it possible to add a DNS record or similar to the domain server of our local network (SBS 2008-R2), so that machines on our network can access my websites without having to edit the hosts file on each machine?
Apologies if this is a noob question - I have tried to RTFM, but I am not a network specialist and can't really even be sure if what I'm reading is relevant to my problem, so I really need some help. Thanks.
If you want to use a made-up hostname, it either has to be in your hosts file or in DNS. It's obviously possible to add new subdomains or aliases (CNAME) that point to your existing IP/host to any DNS server -- it's would seem to be a routine operation for your DNS administrator.
After a lot of research I eventually found out how to achieve what I want. I created a new forward lookup zone with the address dev.testsite.com, and then created a blank A record and set it to the IP address I wanted it to forward to. Anyone on my network can now type dev.testsite.com to see the local apache server, or www.testsite.com to see the live version.
I'm sure there are also other ways of achieving this, but as far as I know this is the simplest.
I'm currently beginning to learn Apache. So I'm really a beginner here. I've been able to set up a basic site and virtual hosts that I can access within my own network.
Forgive me if my question sounds stupid but is it possible to access my virtual hosts via name-based virtual hosting using only my external IP? Or would I have to have an actual registered domain name for my virtual hosts that will be mapped by DNS to my external IP?
I might have answered my own question here. But I dunno. I'm a total noob here.
Thanks!
You can serve multiple domain-names off of a single IP, though IMO it is always best practice to have separate IP's for each domain/subdomain you want to use, as over time you might need to move domains around across different servers. In these cases you can (if your hosting set up allows) move the IP address along with the site you are migrating without having to update DNS.
While it's not a good permanent solution, PageKite is a neat service that could help you out
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've just (about 1 hour ago) associated an Elastic IP to my instance at Amazon EC2. If I SSH into my instance and type lynx localhost I can see that apache is responsive because I see the It works page.
However, If I browse into my instance (both via the IP itself and via the public DNS Amazon has created for me), I get Oops! Google Chrome could not connect to.. bla bla...
Should I wait some more time (in case it's due to some DNS thing) or does this indicate something is wrong?
Thanks in advance
EDIT: When I ssh into my instance, I use the full IP address and it works... (the Elastic IP I mean).
You must config the firewall to open the HTTP port.
To be more specific, for AWS this is done via Security Groups. You should create one with the ports you need opened. In most cases that's the por 80 for TCP.
You can see how to achieve this on the documentation http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
First identify the security group of the Ec2 instance.
Next click on the security groups link in the bottom left nav.
Select the security group under which this EC2 instance lies,
and add Inbound rules by specifying the port or a custom port range.
For those of you using Centos (and perhaps other linux distibutions), you need to make sure that its FW (iptables) allows for port 80 or any other port you want.
See here on how to completely disable it (for testing purposes only!).
And here for specific rules
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am running Apache/php on my localhost and would like to be able to make this publicly accessible from the internet.
I think this is achieved by port forwarding? Can someone point me in the right direction?
Well sir you should try ngrok it is free and works with everything that I throw at him (node servers, xampp etc.)
It depends on the connection you have.
If your machine has a public IP address, it's on the Internet already. Then all you need is to allow connections to port 80, both on the local firewall and the home/corporate firewall.
If your machine is behind a set-top-box, or inside a corporate network, chances are that you're not on the Internet. In some instances, a router does NAT (Network Address Translation) between a local (non-routable) network and the Internet. In this particular case, you need to set up port forwarding on the set-top-box or router.
You might want to check out Pagekite - it's an open-source software that allows you to expose your local resources to the outer internet without you needing to reconfigure your router or firewall.
There's a similar service called Show off which does much the same thing, although it seems a bit more limited.
You could try beame-insta-ssl, it's a good way to get free tunneling services and a free SSL certificate to expose your localhost. It's open source on git here: https://github.com/beameio/beame-insta-ssl/
Only port forwarding would work but you would need to connect to your server thru it's IP.
take a look at dyndns.com, there you can get a DNS ID that points to your server.
After that you set your router port 80 (HTTP) or 443(HTTPS) to point to your PC HTTP server port ( this can be any port you wish)
It depends of what do you mean localhost? Each system has its own "localhost".
If you mean that you have something like: "your system"<-->"gateway/wifi router"<-->Internet than you should configure port mapping from your router external interface to your server' IP address. Check your gateway/router documentation for more information.
Another tool for port forwarding through OpenVPN or SSH tunnel is https://portmap.io . If you're running multiple vhosts on local Apache, you can set host-header with required hostname.