Configuring BIND for Ubuntu Web Server - nginx

I am looking for some assistance configuring BIND to host a DNS server on my web server.
I recently acquired a dedicated server running Ubuntu 14.04 LTS and I already have Nginx, PHP-FPM, MariaDB installed and working perfectly. My knowledge of postfix & dovecot are slim, so I followed this guide: A Mailserver on Ubuntu 14.04: Postfix, Dovecot, MySQL. The good news is that I've got mail coming in and going out as expected, but have come across another issue, which is some ISP and providers are denying the mail since there is no PTR records used.
So, I'm assuming I need to install and configure BIND to set up DNS and to set up a PTR record so that my mail will reach its destinations. I've tried Google with some tutorials but none of them seem clear for my purpose.
Installing a control panel, or one of those all-in-one scripts is out of the question since I already have the web server configured. Another issue is that some of them don't work with Nginx or use a different configuration of PHP. Plus, I want to learn how to do this on my own.

You don't have to install bind. Who ever has reverse DNS authority for your IP block will typically create a reverse name for you. Just request a reverse pointer record with the mail domain name for your IP.

Related

Wordpress not working after changing instance type on Google Cloud Platform

I changed my VM instance from "F1-micro" to "E2-micro". When I then restarted my machine, I couldn't access my webpage using the domain name, the webpage just shows an "Error 521" code - showing that my browser is working, CDN is working but the host has an erorr. When I paste the VMs IP address into my webpage, however, it show's the "Apache2 Debian Default Page".
Can somebody please help me with this?
The Error 521 message is caused by one of two situations:
First, check whether your WordPress site’s server is down. Even if everything else is configured properly, if your WordPress site’s server is offline, Cloudflare simply won’t be able to connect.
Second, your web server might be running fine but blocking Cloudflare’s requests. Because of how Cloudflare works, some server-side security solutions might inadvertently block Cloudflare’s IP addresses.
Cloudflare is a reverse proxy, all the traffic coming to your origin server will appear as if it’s coming from a small range of Cloudflare IPs (rather than each individual visitor’s unique IP address). Because of that, some security solutions will view high traffic from a limited number of IP addresses as an attack and block them.
Please check this link out in order to fix error 521 for Cloudflare and WordPress.
Turns out this problem was caused by my having installed the Debian Apache server package and it is causing collisions between it and the Apache shipped in the stack. Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system.
So to fix this, all I had to do was run the following commands:
sudo systemctl stop apache2
sudo /opt/bitnami/ctlscript.sh restart

LetsEncrypt Install on a Raspberry Pi web server

I've created a web server on my Raspberry Pi 4 and using it for a web project that I'm currently working on as well as future website projects. Currently, I'm running on Pop OS Linux distro on my main laptop and SSH to the Raspberry Pi running as a web server. I'd like to install the letsencrypt SSL on the webserver. I've found some tutorials on a Google search and have had no luck with the installation of certbot. I'm currently running the Nginx web server on the Raspberry Pi.
I have changed some of the settings on the /etc/Nginx/sites-available & sites-enabled and still no luck with the SSL running on the webserver. Are there any other suggestions or tips that anyone can throw my way to get this web server installed with a secure socket layer of encryption? I'm currently running the web server on my Raspberry Pi's IP Address. Maybe I need to change it to an actual domain name beforehand and see if that works?
When I run:
sudo systemctl status nginx
It returns as active. Which is good. Any suggestions?
You should go for following the steps, serially:
You need to register a domain name with a official DNS (Domain Name System) Register, e.g. NameCheap, Google Domains, Go Daddy.
Install certbot following instructions on Let's Encrypt tutorials all SSL/TLS certificates will be installed automatically, (assuming that you're not requesting a wildcard certificate, I too recommend not doing so as it's a hassle in getting a wildcard certificate).
Make sure all ports are correctly forwarded to the Raspberry Pi and that there is no firewall interfering with the ports 443 and 80 and make sure that your ISP is not blocking them whatsoever, since Let's Encrypt needs to verify that your domain name and website exists and is accessible.

Automatic configure wordpress IP on EC2

I have installed a LAMP server on an EC2 instance. Then I created an AMI so that I can easily spin up instances in the future.
Today I went back to spin up one such instance, and to my surprise the IP in the configuration is wrong. Basically when I first installed the LAMP server, Wordpress detected the IP and configured accordingly. Now on the instance that I launched today the IP is different, but the configuration for the previous IP is still there.
Now, I know how to change Wordpress IP. My question is: How can I make this step automatic when I launch an EC2 instance from an AMI?
Thanks
Instance Metadata will give you a lot of information about the current EC2 instace. You can use that + some hand-crafted shell scripts which will be triggered on boot to update configuration.
An alternative solution is to use some configuration management tool (Chef, Ansible ... ). To help you configure the application.

Make Laravel Homestead Accessible via the Internet

How can I make Laravel Homestead (a Vagrant vm) accessible via the internet? Currently, I have set my router to port-forward to my host machine's local IP. However, that causes the Laravel site to think that all incoming requests are coming from 10.0.2.2.
What would be the correct way to make the site accessible via the internet? Would I have to get the VM to be assigned an IP from the routers DHCP? If so, how do I do that?
The correct answer these days would be to use Homestead's share alias on the command line via ssh.
eg. share acme.app
Behind the scenes, this uses ngrok and is documented in the Laravel documentation.
You can make it work with xip.io service. More details here: http://christoph-rumpel.com/2014/10/access-laravel-homestead-projects-through-other-devices-in-three-little-steps/
Chances are you need to tell Laravel to trust the router as a proxy:
Request::setTrustedProxies([
'10.0.2.2',
]);
This will work if the router correctly sets X-Forwarded-For sort of headers.

I want to add a server to my domain name

I recently purchased a domain name and I have an old computer I was wondering if there were any how to's or tutorials on how to set up the server and use the domain name I already purchased.
I am just providing with a beautiful link which guides one to set up a safe and secure Web Server.
here it goes--->http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/
I recommend installing something like Ubuntu Minimal 14.04 on the old machine, then hooking it up to the internet and installing NGINX. After you have the website working, you can forward ports 80 and 443 and set the DNS of your domain to your IP address.

Resources