Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

Thursday, February 13, 2020

Unknown knowns: Location of Apache httpd.conf (000-default.conf) on Debian 9

/etc/apache2/sites-available/000-default.conf

I am still quite new to Debian environment much less Linux, so I have trouble finding things especially when they are configured slightly differently. I am not sure if I am just not searching refine enough or something else.

Sometimes I run into configuration issues like setting up the static folder for Django. The instructions I find online point to a httpd.conf file which I cannot find. I see other similar files, but none does the trick. Then I recall updating 000-default.conf file from previous setups as I stumble across it again in search of httpd.conf.

Of course, this requires a service restart.

Wednesday, January 29, 2020

My Thoughts: Learning Linux is hard (from Microsoft products) but worth the price?

The amount of information that is purely leaking out of my head as I write this article is just ridiculous. I just finished configuring Django/Python, Debian, Apache, MariaDb (after PostgreSQL), Google Cloud, PuTTY, DBeaver, Eclipse, and Git from scratch (no knowledge). That experience was so very tedious.

If I were to do this again, I would have learned Java and MySql first. The rest are fine. The biggest hurdles was reading documentations for MariaDb which some doubles from MySql. This worked for the most part, but in some rarer instances, MariaDb has kind of split from MySql. So, I spent a lot of time following directions that didn't work. Django was an added layer too because I was not sure if it was Django configuration or an Apache configuration. I think by going with Java and MySql, I would have one less layer of technology to figure out where my problem was.

Another hurdle was that I was working of a Windows system while configuring these technologies on Google Cloud. Of course, I also went with Debian without the GUI so I had to learn all the terminal commands. I did not setup a comparable environment on my machine so I had to upload to Google Cloud to test things. This of course meant that I had to figure out how to connect PuTTY and DBeaver to Google Cloud.

Visual Studio may be a good alternative to Eclipse and DBeaver. That I am not sure would have been easier or not. From my experience most people in this tech stack typically use Eclipse. I am not so sure about DB IDE.

Compared to my experience with Microsoft products, this was much much harder than learning MS products. Wizards, tutorials, how-to instructions, etc. were all levels easier to focus on the configurations that needed to be changed. MS definitely got my up, running, and programming within the same day. This took me about 3 weeks only weekends and some nights, so maybe equivalent to 10 days of actual work. Either case, way longer than it took for MS. Maybe this is a sign of my age...

As for pure learning curve goes, MS is way easier and faster.

As for performance, empty shells of a project is already way faster than empty MS projects.

As for price, MS is way too expensive.

In conclusion, there are pros and cons to both. As a person that wants to make decent wage to effort, learning non-MS product is worth the price as they are paid more in general for similar jobs. Good MS developers can still be paid well in higher tiers but there are fewer available openings and more lower quality developers vying for the same role plus managers who cannot recognize good talent.

Saturday, October 12, 2019

Expanding to Linux, Apache, Postgres, Python, and Django in Google Cloud

I finally got around to learning Linux and Python for the second time. I tried many years ago at a friend's place but never went back after I messed up a build. This time it was way faster with Google Cloud.

I spent about half a day figuring out the free trial versus always free. In reality, I was trying to figure out and extrapolate the always free part. Because as a hobbyist, this was very intriguing part. So basically, I can spin up a small VM and Cloud Sql for free, of course up to a certain limit which I think is well below the traffic and usage that I will be working in.

I think this is great because I am mostly on to practice and learn. If I were to expand my projects, scaling up my projects looks to be kind of simple for both infrastructure and cost. Although I did not delve deep into how to do that exactly. But the costs seem rather reasonable on a personal level.

I spent the rest of the day learning the different parts of google cloud. I quickly went through some of the options then saw all the different types of OS and DB google cloud has to offer. Of course, I spent most of the time figuring out which Linux distro to choose (Debian) and database (Postgre).

I chose Debian because it was free and seemed to have good amount of documentation online. I chose Postgre because it is new to me (I have worked with Oracle, MySql, and MS Sql in the past) and appears to be gaining some popularity (and also been seeing quite a few on job posts).

The next day, I spent all day trying to install Python, Apache, and Django. I spent part of the day looking into which web server to use which I almost scrapped because Python had its own server. I could not get the Python web server to work properly because I did not know how to open a web browser to be local within my google cloud "space" (I am still unsure if that is even possible). I was not able to open the ports to access it from an external source.

I also spent a lot of time trying to learn all the Linux commands to install. I spent a good amount of time trying to find what I can do without super user (sudo) which I found to be almost nothing. I was eventually able to install Apache with Python by following directions and open it from my system's browser (outside of google cloud).

I then looked into Python IDE which then I stumbled across Django which I later learn is a framework for python web development. So then I attempted to install Django, but ran into a lot of issues. Because I already had Python and Apache installed, I was trying not to repeat certain steps or skip certain steps. Because I was not exactly clear on what needed to be done and things were not working, I deleted my Django project and tried to start over.

I had to start over a few times until I found a different site (https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8) that eventually got me up and running. On the bright side, I am now a bit more familiar with a few basic Linux commands: sudo, nano, mkdir, rm, mv, cp, service, etc. At least I think they are Linux commands as opposed to Python or Apache commands.

I have not started any programming yet, but excited to eventually get to that point. I still need to learn a bit about the Django framework before I can really start. So hopefully, I will get some time to work on that soon. Also, I still need to find an IDE or text editor.


Reference

https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8

Saturday, December 14, 2013

Ubuntu: Day 3 - Crashes, Django, Apache

Continuing to watch videos. Ubuntu appears to crash whenever I leave the videos on overnight. This was the second night that this has happened. After the first night, I was able to use the mouse and click on other windows but was unable to type anything in. Also, I could not click anything on the top so I could not shutdown or restart. I was able to close windows and open whatever was in the left panel. After the second night, I had left the youtube video on full screen. I was not able to click on anything at this point although the mouse moved. Clicked on videos, replay button, full screen button, and keyboard shortcuts do not seem to do anything. Both times I had to hard reboot. Everything seems to function after rebooting.

Yesterday, I installed Apache while I was watching videos on Python. I came across Google's Python 2 day class which I thought was very informative while I was cooking. The day 2 part 1 on regular expression was worth skipping. It was more on RE than on python programming. If you are watching for RE, it may be worth it. I did hear much of it as I was washing dishes while that section played. Afterwards, I tried to find some more tutorials and came across Django.

Django seems interesting. It is a web application framework. So far it seems analogous to ASP.NET for C# (and other .NET languages). I am hoping to get some time to install and actually start playing around with all the different apps that I've installed.