Search

HTTP server's Tags

Create FTP Client and Connect to Server in Cpanel
cPanel is a web hosting control panel software which provides many fuctionalities directly from GUI. With cPanel, you can manages, users, file manager, softwares installations etc. from the panel. In this aticle, we will show you how you can create new user for File manager as well as FTP. We will also go through adding user in FileZilla and connect to server. So let's start by creating users in cPanel After you logged in cPanel, click on user icon on the left top corner. This will list and current user list. You can edit or remove user from this page. Now click on Add User button on right top corner. This will open User form with few details. Input the users details username, email, password etc. Now in the last There are three cards with option. Now enable the FTP by clicking on switch. Select the Home Directory which you want to allow for the user. If you want user to access Web disk in cPanel, then also enable it. Now click on Create button and it will generate user. We will use FileZilla application for connecting to server. FileZilla is free and open-source FTP client application. After opening FileZilla, Go through File > Site Manager menu. On the left side, Click New Site button and input the name. On the right side input the user details. In the form use these options: Protocol:  FTP - File Transfer Protocol Host: Website that you selected Port: 22(default) Encryption: Only use Plain FTP(Insecure) Logon Type: Normal User: username@website, Example, root@hackthestuff.com Password: User password Comment: Extra information After you add these details, Click Connect button to check connection. If everything is right, you will be connectedto server and popup modal ask to accept Trust.
How to Enable CORS in NGINX
CORS or Cross-Origin Resource Sharing is a protocol that will provide access resources to different domain. This is most commonly used for Javascript requests. The main use for CORS is to use CDN files like css, javascript or images load from different server. In this article, we will discuss how you can allow CORS policy for Nginx server. This can be done through adding header Access-Control-Allow-Origin *. add_header option in Nginx server will add the new header to request. So if you want all request set the header, you need to add the header in default Nginx config file. The default Nginx confinguration file located at /etc/nginx/nginx.conf. So lets edit file in nano editor. sudo nano /etc/nginx/nginx.conf And add the below option in the server key. server {     add_header Access-Control-Allow-Origin *; } Save and exit the file and restart the Nginx server. sudo service nginx restart That's it. Now every response will add the header Access-Control-Allow-Origin: *. To test it, run any site URL in Postman app and see the response header. I hope you liked this article and help on your work.