I promise this is going to be the last post about setting up this site.
The site was down for most of this week, because I tried to set up PhP on my pi. Unfortunately, the server I was using, Caddy, didn't like that. I needed to setup PhP because while I technically had a contact form, it was just a form I was liking to from a different site. I wanted to set up my own contact form in PhP so that I could edit the form in any way I wanted to. Well, I tried to set up PhP and ended up shutting down the site. So that didn't work.
I tried to set up caddy again, but it didn't work. I have no idea why Caddy worked once but not the second and third and fourth attempts, but that's what happened - whenever I tried to set it up it said that there was some other process listening on a port that it needed to listen on. When I got it to stop listening on that port, it said it wasn't authorized to use it. I tried for a few days to get it set up on nginx, apache2, and one time I even tried to install Ubuntu onto the pi but accidentally flashed the iso rather than the zip file, which caused the SD card to be completely unreadable The macOS disk utility didn't help, and I had to delete the contents using the command line.
In the end, I managed to get apache2 to work. The problem was actually very interesting — my site is a .dev site, which means that is is on hsts preload list. That means that it can only be loaded using https, not http. The issue I was having is that if you typed in my site's IP address into a browser, it could be reached. But not if you typed in the URL. I assumed it was the issue with the DNS server, which kinda makes sense. The DNS server (i'm using Njalla ) is an external server that owns your URL and causes people searching your URL to redirect to your IP address. Since the IP address worked but not the URL, I assumed that was the issue. But it turns out that the issue was actually that I didn't have an SSL certificate. An SSL certificate is what allows your site to be served on https. Since all .dev sites are hsts preload, my site could not be served unless it had a certificate! So I got one with certbotand now my site works.
LAMP is a stack, which means it a set of tools that people often like to use together. It stands for Linux+Apache+MySQL+PhP. I already had Linux because Raspbian is a Linux distribution, I had just started running on Apache2, so I installed PhP and MySQL! I then used PhP (and a pre-made template by free contact form) to create the contact form. Hopefully I will by able to use MySQL to make people able to comment on my posts! Haven't done that yet.
Also: I got tired of typing in my password in order to connect to my raspberry pi so I created RSA key. Enjoy some randomart!
Also some fun news: I was accepting to a hackathon at MIT, and one at Penn! It's going to be a fantastic opportunity for me to network with professors at both those schools, many of whom are fantastic AI researchers. One problem however: the hackathon at MIT is on Rosh Hashannah, which is one of the two most important Jewish Holidays! I'm a bit upset that they didn't notice but I will probably still go to some of the event. I wish there was something I could do about it, but there doesn't seem to be. The event should be fun anyways though!
After that you should be done! Please contact me if it doesn't work or you have any
Thanks for visiting my new site!
May you be ever victorious in your endeavors.