Hosting my own website via XAMPP? - apache

Basically what I am trying to understand is if I purchase a domain called www.example.com, can I somehow create the website for that domain and host it through my own computer via XAMPP? Or do I need to purchase hosting from some where else such as HostGator?

If you want to host on your computer:
Have an IP Public
Setting your server : use Linux (Cent OS, Red Hat, etc) or Windows server
And other configuration
Recomended to buy a service on hosting service, like Hostgator, hostmonster, bluehost, or etc.
you will get instant and no need to setting.

Related

Forwarding to unwanted site

I host an Odoo instance (website) on an Ubuntu server which I access through a .dyndns.org address via port 8069.
Recently I was attempting to make a SSL certificate and since then I am unable to access the Odoo instance over WAN, instead browser windows redirect to my business website which is hosted by a commercial company. I am able to access the Odoo instance on the LAN. Obviously I have done something, but I don't know what. How do I stop Apache forwarding?
You have to use Nginx as reverse proxy : https://www.odoo.com/fr_FR/forum/aide-1/question/nginx-reverse-proxy-on-80-443-32052

how to access my web app in apache-ubuntu with custom domain name in a LAN?

I have developed a web app using laravel & apache 2.4 in ubuntu 15.04 inside vmware. I have configured ip address of the ubuntu as static which is 192.168.1.250.
Within ubuntu i can access the web app from ip 127.0.0.1 or localhost. And from the networked devices, i can access it using the ubuntu's ip address 192.168.1.250.
Now, i want to access the web app using a domain name from the networked devices instead of IP address. I think i need to install and configure dns server in ubuntu along with apache. So, i installed BIND dns and tried to configure it but failed. So, if it can be done with BIND, then i was wondering HOW? If not, then what may be another way? Thank you !
You can create a tunnel to your local environment by using ngrok which will give you a temporary address (to keep the address static you have to use pro features a.k.a paid features)
Follow this steps:
Download ngrok and unzip ngrok
Open a cmd / terminal and navigate to ngrok location
Type the following command:
ngrok http {your_localhost_server_port_number}
It will create the tunnel but we need to point a virtual host to it so edit your local server virtual host and add an alias / server name like following:
NOTE: if you only have one app running on your local server this step is optional
*.ngrok.io
Now restart your local server to load our new configuration
Now you are able to see your localhost site online by using the ngrok provided url.
Enjoy!

Godaddy Domain To Point To Home Web Server

I have a home web server running in XAMPP on port 80. I access my website using my external IP.
I have a godaddy domain that I would like to point to my web host. I don't think domain forwarding is what I want because with this it just masks the URL and I want it to actually direct to the web host.
How do I make it so it points to my local web host on my server just like it did before when I had hosting through godaddy?
Can anybody help me out? Thanks.

How to set a custom website name instead of ip address for local computer?

I can point a url to a directory in my computer by setting /etc/host and /private/etc/apache2/extra/httpd-vhosts.conf files. For instance, when i type sample-app.com in my computer, website under /Users/azad/works/sample-app.com folder is running.
When someone type sample-app.com in another computer in same local network i want to display the same website located on my computer. Is this possible?
By the way, i don't have access to any computer in the local network and i can't do any configuration.
Mac 10.7.5 (I am using mac but if windows is better for this purpose i can use windows too),
PHP 5.3,
Apache 2.2
If you want to accomplish this on windows, use the hosts file on the computers you want to point at that sample-app.com URL mapping your IP address to that URL in all the computers you want that to work on. Then make sure your HTTP server is configured to serve that website under that host name for port 80.
Since you aren't able to configure the local network, the best way to handle this situation is to configure a host name with the website domain's DNS server, such as dev.sample-app.com, which points to the local IP address (seeing as how its on the local network) of the computer hosting the website. This will then allow other computers on the local network to enter this host name to access the webiste.
If you had control of the local network's DNS server or control of the proxy (if they have a proxy), there would, of course, be other options.
Update:
Since you mentioned in your comment that you have control over the DNS server, here is how you could accomplish your goal via the DNS server. First, add a forward lookup zone for sample-app.com to the DNS server. Second, configure the default host for the zone to point to the computer serving up the website content. Now the client computers will resolve the local IP when the user enters sample-app.com into their web browsers. If you need to continue to have access to other hosts on sample-app.com, you might want to try asking about it on serverfault.

how to make apache server public

I want to convert my pc to a web server. I installed centos server and apache server.
How I can make apache server public? I want to everyone access my web site on my pc via browser.
Thank you..
You have 2 ways, you can buy a domain and a static IP address for your computer (usually through the service provider) and configure your router and FW to allow access to the machine for port 80.
The other way is to use some sort of dynamic dns service like DynDNS to be able to bind a DNS to a dynamic IP address (you will need to run a daemon to update the account once in a while because your IP may change). The FW and router rules are still needed in this case as well.
After you do one of the these steps everyone should be able to access your apache server on your computer as long as it's on.