Best Way To Self-Host a Webserver and stay "Anonymous"? - apache

I have gotten into making web pages with apache/nginx and I want to know whats the best way to have either a proxy or a VPN setup so whenever anyone points at my domain they won't get my IP so easily
The Domain should auto change the IP if it sees any changes so that shouldn't be a problem
I wanted to make a proxy list into a file and use it but I haven't really find a way yet
Any Suggestions?

You can set up a reverse proxy with nginx and apache i.e. when someone tryies to access your website by typing in your domain, their web browser will query a domain name server to get the IP address associated with you're domain. Their web browser will then send a request to your nginx server IP which will then in turn send a request via reverse proxy to your apache server IP where the physical web page files are located. Apache IP address returns the requested web page files to nginx IP address and nginx in turn returns the requested web page files to the client IP address.

Related

Adding an "A" Record as a subdomain to an IP removes HTTPS?

We have a domain name (e.g https://example.org) that hosts a website, and we want to have a subdomain (https://app.example.org) that will run a certain service.
That service is a different website that resides on a totally
different server.
I have added an "A" Record in the domain's DNS that points the
subdomain to the IP of the other server.
When trying to access "https://app.example.org", I get a warning
message saying that this website is not secure (normal http works)
Accessing the top-level domain via HTTPS works normally.
What needs to be done in-order to have the subdomain secured when using an "A" Record?
Is it something that needs to be done on the new server or in the domain's cPanel?
Thank you for any help.
You will have to make sure that your SSL certificate is wildcard certificate and Certificate is also installed on other server as well, where you are pointing your subdomain.

Subdomain redirect for API setup

I want to host my API application in a separate server and route it through subdomain fo example api.example.com. My domain is hosted at HostGator. I have created a subdomain and redirect it to the API server by providing the IP address.
The application is written in Codeigniter for RestAPI. Whenever I call any API method by referring the subdomain it shows 404 error (api.example.com/myclass/myfunction), but if I access the same API using a direct link (192.0.2.1/myclass/myfunction) by providing the IP address of the server, it is returning correct result.
Please suggest any configuration change needed.
You can add A record on sub domain, if application is hosted on port 80.
You can simply add A RECORD as
192.0.2.1 api.example.com
You should have option to create DNS zone on hostgator.

Ant-Media-Server + SSL without Domain

Ant-Media-Server is running on an IPAdress without any domains. We just set up this server to be used for streaming in order to use it from different domains pointing to different servers.
Since all of our domains use ssl, we face the typical connection problem:
mixed Content: The page at 'https://SOMEDOMAIN.com/QUERY' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://1.2.3.4:56'. This request has been blocked; this endpoint must be available over WSS.
Ant-Media already offers tutorials on how to install a Let's Encrypt SSL Certificate but sadly it is not available for pure IP-Addresses.
Apart from the Ant-Media Service, the server doesn't has any NGINX, NodeJS, Apache or other http Servers installed - the plan was just to use it for streaming by calling the IP-Address.
Do you have any ideas on how to solve that problem?
Unfortunately, this is not possible.
The goal of having a SSL is ensure you are requesting the right domain name besides encrypting the content between your users and your server.
Here are some alternatives:
create an endpoint in your own app that proxies data to your server.
Instead of playing the IP address, you can play:
/your-proxy-url?stream=http://yourIp.com:port/....
Note that using a proxy will make all the traffic pass through your web app.
As a reference, if you are using PHP on your website, you can have some ideas from here: https://gist.github.com/iovar/9091078
Create a reverse-proxy in front of your web app that redirects the traffic to your IP address.
Both solutions does not change your Ant Media Server, just adds a new resource between your users and your streaming server - adding the SSL on it.

Subdomain working fine with http and not working with https

Recently I have installed ssl certificate on my website. After the ssl certificates have been installed ,I found that my subdomain is not working properly. I will address my subdomain as 'xxxx'and main domain as 'primary'. The main domain works well with http as well as https. Now the subdomain works well with http, but with https://xxxx.primary.com delivers me the main site content and not the content of subdomain. I'm using apache server, linux operating system.
Can anyone please help to solve this issue?
Thanks in advance.
This is how SSL protocol works with the browsers. Whenever browsers receive HTTPS request for domain name, it first checks with the server then delivers the site's content. If a website on server has enabled SSL accessed with HTTPS, browser will try to make secure connection and send request to the server.
In your case, your main website is working properly with HTTP as well as HTTPS and delivers proper content, but your sub-domain is not showing proper content for HTTPS. In order to deliver proper content you should consult with your development team. You can better host your sub-domain on another server or you can protect your sub-domain with valid separate SSL certificate.
Suggestion: If you own multiple sub-domains then it is advisable to use Wildcard SSL, that can protect unlimited number of sub-domains with single certificates. Please note, this unlimited does secure first level (blog.domain.com), doesn't second-third-fourth-etc. level (news.blog.domain.com, 1.news.blog.domain.com or abc.1.news.blog.domain.com).

Cloudflare blocks VB NET Web Requests

I'm trying to send a request and retrive an information from the website with my program using HttpWebRequest in VB .NET.
The problem is that since the website use Cloudflare, my requests returns an 503 Server Unavailable error.
What can i do to make the web requests works with Cloudflare?
Thank you,
My advice is you whitelist the IP of the server hosting the VB.NET code at a CloudFlare level. To do this, select your site in the CloudFlare admin panel, select Firewall > IP Firewall. Then simply whitelist your IP under Access Rules by adding it there (make sure to select whitelist instead of block).