Linux Technology

Why my web server doesnt work ? (ubuntu)

Check 80 port on your server :

sudo netstat -tulpn | grep :80

In my case I saw my 80 port have gotten by Nginx but I want to give it to Apache so I used this command :

sudo systemctl stop nginx
sudo systemctl start apache2.service

and it worked perfectly

devops Linux Technology

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

The article in the link below helps in this way.

Check it out.

Linux Technology

Linux Disk became readonly

it sometimes happens because you have multiple Operating systems, for example, i have windows and Linux on my machine so I got this problem:

after you tried to mount and unmount your disk you can use the command below as super admin:

sudo fsck -f /dev/sdxx

sdxx is the name of your disk, you can get disk names by command below :

sudo mount
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

3 . open the file that you created :

sudo nano

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

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 :
Linux Shell Technology

Define Shortkey in the command line, Linux (Ubuntu)

For bash you have to do the following steps:

1) Open your .bashrc

sudo nano ~/.bashrc

2) Add new alias (at the end of the file)

alias phpstorm='cd ~/Downloads/phpstorm/bin/./'

3) Save and close the file

4) Source the .bashrc file

source ~/.bashrc

reference :

Linux Shell Technology

Linux Crucial commands – Chmod Command in Linux (File Permissions)- part 2

See file permissions :

ls -l example.txt

-rw-r--r-- 12 linuxize users 12.0K Apr  8 20:51 example.txt
|[-][-][-]-   [------] [---]
| |  |  | |      |       |
| |  |  | |      |       +-----------> 7. Group
| |  |  | |      +-------------------> 6. Owner
| |  |  | +--------------------------> 5. Alternate Access Method
| |  |  +----------------------------> 4. Others Permissions
| |  +-------------------------------> 3. Group Permissions
| +----------------------------------> 2. Owner Permissions
+------------------------------------> 1. File Type

What is chmod in Linux:

in UNIX OSes, chmod is a command to change files and directories permissions.

chmod stands for “change mode”.

one of the most important reasons for Linux to be on the list of safe OSes is that every user has their own permission for each file and folder.

devops Linux Shell Technology

Linux Vim commands

quit of editor without saving