-->
Bayu_Ajie
Bayu_Ajie knowledge is free you can learn anything

mistake when configuring web hosting

 Mistake when configuring web hosting



Hello, welcome back again with me Bayu Aji this time I will make an article about web hosting. Yep, of the many questions that I met whether it was from my friends, discussion forums and other things, therefore I will make a recap of your mistakes when configuring in web hosting


Ok, here are the errors when configuring web hosting that I often encounter, let's see the explanation below


# Forgot to set DNS

Yes, this is often what I meet, many friends, my relatives ask about this, if you use VPS, shared hosting and others, the first thing you do is DNS settings, you can set DNS in cpanel settings or member area on which hosting service you are using, if you are confused about how to set up DNS, you can contact the hosting service you are using, but my advice is to learn by yourself by finding out in open sources. Yes, you can find information about DNS settings, make sure the server name (NS) matches the name of the server hosting service you are using


# Forgot to set the language version used


Ok, the second case is not setting the version of the programming language used, my example here uses php, and I created this project with php version 7.4 then in web hosting you have to set the same, otherwise it will cause an error, and don't forget you can customize the php extension that you will use, you can understand in your own project, if you are confused you can do or check with the command

php -m  

php -i  

You can run the command by remote ssh or look in cpanel, this method is usually often forgotten, especially beginners make sure the version, extension, programming language according to your project if different then an error will occur in the web hosting


# Error while configuring database 

The third point is the database, yep, if your project is a web application or dynamic, you definitely need a database, so this method is often a problem for beginners. Yep, I often come across questions like this, so you can see the picture below


Yep if you have a database, don't forget to add user and database access, when you have added this, then you can add permissions. Well you can tick all to get permissions or Privileges


After that click ok and add, if this process has been configured, the next step is setting your environment, make sure the user name, password, and database match the configured ones. Example

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=fpnqbake_test
DB_USERNAME=fpnqbake_tester
DB_PASSWORD=password

Setting the environment and adjusting to what you are using, in this case it follows from the project you are using


# Setting .htaccess 

The fourth point is setting .htaccess, htaccess is useful for setting the web server you are using, for example nginx, litespeed, apache and other things, if you don't set this error will occur, you can set anything in .htaccess such as redirect https, block requests and other things, if you want to learn more about .htaccess you can visit in the link below

https://httpd.apache.org/docs/2.4/howto/htaccess.html 

http://www.htaccess-guide.com/ 


For this problem you can adjust the project environment you are using


# File Permission

Yes, the next thing is permissions, this point often has errors, most people, especially beginners, often forget to set permissions whether it's in files, folders and others this will cause errors when in web hosting, make sure and adjust the permissions you use. Don't let some files be inaccessible and easily accessible to the public


# Case Sensitive

Okok last point is case sensitive. In web hosting, linux is very sensitive, make sure your file name, folder name, class match what you created. Example image below



I often encounter this problem, most beginners do not pay attention to the case sensitive name, this will cause an error. Why doesn't an error occur on localhost or Windows? Because Windwos doesn't pay attention to case sensitiveness, so it won't be an error, try it on Linux, there will definitely be an error because Linux prioritizes case sensitiveness, don't let this trivial problem take a long time hahahaha. An example of this problem



Now you can see the picture above, yes the file and class names are different. In the file given the name vaccines but in the class Vaccines. This will be an error, make sure the class name and file name are the same, at this point it must be case sensitive so that it doesn't become a problem


If you have any problems regarding web hosting you can comment below, I just explained the errors that I often encounter, if you have a different problem comment below

Bayu_Ajie
Bayu_Ajie  knowledge is free you can learn anything

Comments