Apache2 Linux GoDaddy - html

Hi I'm new to website development and I am trying to configure a number of websites from my home based server using Apache2 and Linux Mint.
I have setup three new websites in addition to the 000-default page.I have created the Virtual Host config files in sites-available and have added the sites to Host.conf. Internally(on the server in a browser) they are all working fine - I can access all four sites using localhost or the URLs I've configured them with -tested with and without the www. prefix and all seems fine. The four sites are just basic HTML scripts with different headers and different one line body.
I've added Listen 8090 to Listen 80 on my ports.conf file and have opened port 80 and 8090 on my firewall and have updated Port Forwarding on my router and tested they are open using PortCheckTool. The two ports are open and every other port is locked out so that seems good too.
I've tried to configure a GoDaddy domain name to direct activity to one of these sites. The domain name that works internally (on the server in a browser) is the same as my GoDaddy domain name I've bought. I've been into my GoDaddy account and pointed this domain at my external IP address (tried also adding port to forwarding 8090 as well as leaving port number as default). However when I access this domain from my mobile phone using 3G with WIFI turned off I just get sent to the 000-default homepage.Same using default Port 80 and with Port Forwarding to 8090. I have script for both 80 and 8090 in my site config files in sites-available directory.
So the connection is getting to the server, ports are OK, it's just that apache2 doesn't redirect the GoDaddy traffic but redirects fine locally on the server for the same site!?
Any ideas what I am missing?
Any help would be much appreciated.
Thanks.

Related

Chrome port forwarding not working for https port

I went through this article to setup port forwarding in chrome.
Though I was able to work it out for non-secure (http) ports, I couldn't get it working for secure (https) ports. In both cases (http and https) the page loads in my laptop. just the https page doesn't load in my android phone.
Here is the configuration for http site.
And here is the configuration for https site.
Can someone please help?
It took me almost a week to find this workaround. You don't need to root your device, or use a proxy with this method.
You just need to port forward on chrome as you did and edit an android hosts file using Virtual Hosts. The apk is available under Virutal hosts releases in case the direct link does not work.
On your device, create a hosts.txt to map IP addresses to host names:
127.0.0.1 domain.com
127.0.0.1 subdomain.domain.com
Select your hosts file and turn it on! Then install certificates on your device.

Map the service running at a port to a subdomain

I have an MQTT broker running on my Ubuntu Server at port 1883 and a website running at port 80. I want to map my broker to broker.abc.com while my website to www.abc.com. What are the possible steps toward this problem?
Until now, I have tried to add a subdomain broker.mqtt.com in my GoDaddy control panel but it never worked.
For now, I can access my website and broker both at abc.com but I want to separate both of them.
This can be possible if you use 2 load balancer with 2 domain name, for this kind of problem AWS introduce Wildcards (means one hosted zone in Route 53 and you have subdomains related to that). Like abc.com will be your hosted zone and broker.abc.com, website.abc.com will be wildcards.
So One of the Load balancers will redirect your broker.abc.com to port no 1883 and other Loadbalancer will redirect to port no 80.
Your wildcards(subdomains) will be mapped to loadblancer.

create a domain name pointing to an IP of port different than 80

I would like to use a domain name to point to a web page on the local server's IP address. However, the problem is that the page is linked to an IP address set up on port 8088 rather than 80 because the latter is already used by another web page. By the domain company I was told that they cannot do it because the domain can only point to an IP address set up on port 80. So now I am in a deadlock. What alternatives do I have and how can I make a domain pointing to the IP:8088?
Thanks
The domain company that you talked to may have done a poor job of explaining how domains work. Domain names don't refer to specific ports. They just refer to IP addresses. The client can look up a hostname to get the IP address which the client should connect to, but the client has to figure out the port without the help of DNS. Port 80 is just the default port for HTTP service.
You can certainly run a web server on port 8088 if you like. The port number would have to appear in the URL, e.g. http://somehost.example.com:8080/some/page. Clients would parse this and know to connect to port 8080 instead of the default port 80.
If you don't want URLs to contain the port number, then requests are going to go to the default port 80, and you have no choice but to make the web server running on port 80 handle these requests. HTTP/1.1 requests include the hostname which the client wants to contact, and modern web server programs are normally capable of serving completely different sets of content based on the hostname in the request. There are few ways todo what you need:
Just configure the web server for port 80 to handle both sites. This will depend on what web server software you're using. Apache for example calls these "virtual hosts", and here is a set of examples. This is a typical solution, and some people run hundreds of sites on the same server this way.
Run your two web servers as you planned. Set up the server for port 80 to be a reverse proxy for the second website. The server would continue to serve content for the site it handles now. When it receives a request for the second site, it would relay the request to the server running on port 8088, and relay the server's response back to the client.
Move the existing server for port 80 to a different port. Run a pure reverse proxy server on port 80, relaying requests for both web sites to their respective web servers.
You might be better off taking further questions to https://webmasters.stackexchange.com/ or https://serverfault.com/.
You can use a Proxy to reroute the given domain to the IP:PORT. To accomplish this you could either spin up a Nginx server and configure it as your reverse proxy or use this project that does exactly what you want and with almost no config https://github.com/cristianoliveira/ergo
If you run Apache on port 80, which is the most common case then the easiest way to solve this issue is to set a VirtualHost that uses ProxyPass.
<VirtualHost sub.domain.com:80>
ProxyPass / https://ip-or-domain.com:8088/
</VirtualHost>

Does Nitrous.io allow port 80?

Is it possible to start my webserver/webrick/node.js at standard port 80 on Nitrous.io? A lot of company policies don't allow browsing of non-standard port website.
Can I have root access to my virtual machine?
Nitrous.IO currently has ports 1024 - 9999 open only for HTTP. Root access is not available at this time.
You can then access your site via that particular port, or directly on the usual http (port 80) and https ports (port 443).
Custom domain support will be available soon for paying users.
We recently shipped an update that will forward port 80 to port 3000. So you can run your web server on port 3000 and you will still be able to preview your application even if you are behind a company firewall.

Manage mySQL DB by using phpMyAdmin and point browser to ip

Hi I am completely new to phpMyAdmin and mySQL
Is there any way to configure remote management/access of my MySQL database by pointing requests or a browser to an IP? I have my server set up behind a router and have setup port forwarding for ports 8080 (tomcat) and 3306(should be default mySQL). Everything works locally on the machine, however I cannot access the dbs or phpmyadmin by pointing a browser from a computer on the local network to http://IP/phpmyadmin or from externally by pointing the browser to the IP given to me by my ISP. Any thoughts? Is there a specific way to edit the config files in order to allow the use of IP addresses?
Exposing your db and appserver on the internet is not a good idea. If these need to be accessed remotely, use a VPN or authenticated SSL. In the case of phpmyadmin - if this is running on a webserver on your network then you'll need to forward port 80 too - although I'd recommend using HTTPS/SSL (port 443)