Categories
devops Linux Technology

How to run our own Smart DNS to bypass geo restrictions – let’s run something like shecan.ir

The article in the link below helps in this way.

Check it out.

https://maj0rmil4d.medium.com/how-to-run-our-own-smart-dns-to-bypass-geo-restrictions-beeeab4f82d7

Categories
devops Technology

Install PHPMyAdmin on ubuntu

Categories
devops Linux Technology

Apache configuration manual

How to install apache on ubuntu:

let’s write a more friendly than an official apache document :

it’s simple, just follow steps below (Debian bases distributes):

  1. go to path : /etc/apache2/sites-available/
cd /etc/apache2/sites-available/

2. make a copy of the default configuration file (000-default.conf).

for every domain or subdomain that is assigned to this server IP address you need to make a copy of the default file and edit it as I explained in continue:

sudo cp 000-default.conf masoud.me.conf

3 . open the file that you created :

sudo nano masoud.me.conf

change documentRoot to the path you want to load you project

and change serverName to URL that is pointing to this file

4 . save and exit

4.5 . test your changes and be sure that your changes wont make down all apache sites :

sudo apachectl configtest

5 . now you need to add it to sites-enabled

for this you need to execute the command below :

sudo a2ensite masoud.me.conf

6 . important part is to disable the default file :

sudo a2dissite 000-default.conf

7. now you need to reset or reload apache :

service apache2 reload

Reference :

https://ubuntu.com/tutorials/install-and-configure-apache#2-installing-apache
Categories
devops Linux Shell Technology

Linux Vim commands

quit of editor without saving
:q!
Categories
devops Shell

Linux Crucial Commands – Part 1

To restart your machine :
sudo reboot
To see a list of files and folders in Directory simple:
ls
To see a list of files and folders in Directory with complete detail as list :
ls -la
To see a list of files and folders in Directory with complete detail as list :
ls -la
Categories
Best practice devops Programming Technology Web Development

Implement Rest APIs more efficient

Most web applications are implemented based on Rest Full APIs and as I researched huge part of them are not implemented based on best practices and clean code principles, so I decided to collect some points in a couple of posts to help make them more efficient APIs and Applications.

Let’s Look at other kinds of APIs

you can easily research and find out more about all of these kine of API design methodologies but here I’m going to just collect best part of them to create a document to implement Rest API in best practice.

Graphql

the best part of graphql is that you can design your API for the front end to just get whatever need, not more.

it can bring us better speed because less amount of packets is transferring over the network.

gRPC

Socket

Categories
devops Technology

What is Docker?

This article is for you if you …

If you are a developer and you are going to start working with docker, and you already don’t know even the concepts of Docker, this article series is for you.

It was a little confusing for me when I started working with docker, so I decided to publish some articles for bits of help who are beginners to Docker or who want to review the concepts.

Overview of docker

Docker allows users to build independent and isolated development environments in the computer and run their software in a way that we call Container. For example, suppose you need a project with php8.1, but you only have php7.4 on your system(you need the php7.4 version to develop other projects).

In this use case, you can build a docker image that contains your PHP suitable version and your database and other environments and run it as a container by the side of another project in an isolated environment.

Another Docker use case

You are running a Linux environment with different PHP, database, composer, node.js, npm, and…

And your teammate is working on mac os with a completely different environment .

What is the solution?

How can you work on the same project simultaneously in a different environment?

How to deploy a project if the server can’t provide project requirements based on our development environment?

  • docker can solve this problem by build isolated environments in the server and provide exactly requirements of peject in the isolated space.

download and install docker :

  • https://www.docker.com/get-started/