یادداشت های شخصی 🕊️

راه در جهان یکیست و آن راه راستی است، KEEP IT SIMPLE ذهن های آرام موفق‌تر اند

یادداشت های شخصی 🕊️

راه در جهان یکیست و آن راه راستی است، KEEP IT SIMPLE ذهن های آرام موفق‌تر اند

۱۶ مطلب با موضوع «سایت» ثبت شده است

موافقین ۰ مخالفین ۰ ۰۹ بهمن ۰۲ ، ۱۴:۴۴

این آموزش از سایت دیجیتال اوشن گرفته شده است.

https://www.digitalocean.com/community/tutorials/install-wordpress-on-ubuntu

 

Install WordPress on Ubuntu

Before we begin, let’s update and upgrade the system. Login as the root user to your system and update the system to update the repositories.

apt update && apt upgrade

 

Next, we are going to install the LAMP stack for WordPress to function. LAMP is short for Linux Apache MySQL and PHP.

Step 1: Install Apache

Let’s jump right in and install Apache first. To do this, execute the following command.

apt install apache2

 

To confirm that Apache is installed on your system, execute the following command.

systemctl status apache2

 

To verify further, open your browser and go to your server’s IP address.

https://ip-address

 

Step 2: Install MySQL

Next, we are going to install the MariaDB database engine to hold our Wordpress files. MariaDB is an open-source fork of MySQL and most of the hosting companies use it instead of MySQL.

apt install mariadb-server mariadb-client

 

Let’s now secure our MariaDB database engine and disallow remote root login.

$ mysql_secure_installation

The first step will prompt you to change the root password to login to the database. You can opt to change it or skip if you are convinced that you have a strong password. To skip changing type n.

For safety’s sake, you will be prompted to remove anonymous users. Type Y.Next, disallow remote root login to prevent hackers from accessing your database. However, for testing purposes, you may want to allow log in remotely if you are configuring a virtual server

Next, remove the test database.Finally, reload the database to effect the changes.

Step 3: Install PHP

Lastly, we will install PHP as the last component of the LAMP stack.

apt install php php-mysql

 

To confirm that PHP is installed , created a info.php file at /var/www/html/ path

vim /var/www/html/info.php

Append the following lines:

<?php
phpinfo();
?>

Save and Exit. Open your browser and append /info.php to the server’s URL.

https://ip-address/info.php

 

Step 4: Create WordPress Database

Now it’s time to log in to our MariaDB database as root and create a database for accommodating our WordPress data.

$ mysql -u root -p

 

Create a database for our WordPress installation.

CREATE DATABASE wordpress_db;

 

Next, create a database user for our WordPress setup.

CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'password';

 

Grant privileges to the user Next, grant the user permissions to access the database

GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password';

 

Great, now you can exit the database.

FLUSH PRIVILEGES;

Exit;

Step 5: Install WordPress CMS

Go to your temp directory and download the latest WordPress File

cd /tmp && wget https://wordpress.org/latest.tar.gz

 

Next, Uncompress the tarball which will generate a folder called “wordpress”.

tar -xvf latest.tar.gz

 

Copy the wordpress folder to /var/www/html/ path.

cp -R wordpress /var/www/html/

Run the command below to change ownership of ‘wordpress’ directory.

chown -R www-data:www-data /var/www/html/wordpress/

change File permissions of the WordPress folder.

chmod -R 755 /var/www/html/wordpress/

Create ‘uploads’ directory.

$ mkdir /var/www/html/wordpress/wp-content/uploads

Finally, change permissions of ‘uploads’ directory.

chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/

Open your browser and go to the server’s URL. In my case it’s

https://server-ip/wordpress

You’ll be presented with a WordPress wizard and a list of credentials required to successfully set it up.

Fill out the form as shown with the credentials specified when creating the WordPress database in the MariaDB database. Leave out the database host and table prefix and Hit ‘Submit’ button.

If all the details are correct, you will be given the green light to proceed. Run the installation.

Fill out the additional details required such as site title, Username, and Password and save them somewhere safe lest you forget. Ensure to use a strong password.

Scroll down and Hit ‘Install WordPress’. If all went well, then you will get a ‘Success’ notification as shown.

Click on the ‘Login’ button to get to access the Login page of your fresh WordPress installation.

Provide your login credentials and hit ‘Login’.

Voila! there goes the WordPress dashboard that you can use to create your first blog or website! Congratulations for having come this far. You can now proceed to discover the various features, plugins, and themes and proceed setting up your first blog/website!

موافقین ۰ مخالفین ۰ ۱۲ فروردين ۰۲ ، ۲۱:۰۲

I asked bing:

please write me simple html code for under construction page

 

Simple index.html 

<html>
<head>
<title>Under Construction</title>
<style>
body {
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
  text-align: center;
}

h1 {
  color: #333333;
  font-size: 36px;
  margin-top: 100px;
}

p {
  color: #666666;
  font-size: 18px;
}
</style>
</head>
<body>
<h1>Under Construction</h1>
<p>We are working hard to launch our website soon.</p>
<p>Please check back later.</p>
</body>
</html>

 

Then i asked to add comment to the code for better understanding:

<html>
<head>
<title>Under Construction</title>
<style>
/* This section defines the style of the page elements */
body {
  background-color: #f0f0f0; /* light gray background color */
  font-family: Arial, sans-serif; /* Arial font for text */
  text-align: center; /* center alignment for text */
}

h1 {
  color: #333333; /* dark gray color for heading */
  font-size: 36px; /* large font size for heading */
  margin-top: 100px; /* space above the heading */
}

p {
  color: #666666; /* medium gray color for paragraph */
  font-size: 18px; /* normal font size for paragraph */
}
</style>
</head>
<body>
<h1>Under Construction</h1> <!-- This is the main heading of the page -->
<p>We are working hard to launch our website soon.</p> <!-- This is a paragraph with some information -->
<p>Please check back later.</p> <!-- This is another paragraph with a request -->
</body>
</html>

 

- نویسنده هوش مصنوعی مایکروسافت

موافقین ۰ مخالفین ۰ ۰۸ اسفند ۰۱ ، ۱۰:۴۹

فرض کنید شما فقط یک دامنه ساده با قیمت پنج هزارتومان بنام gilas.ir خریده اید و هاست ندارید و می خواهید دامنه خود را به یک هاست دیگر یا آی پی کامپیوتر خود پوینت کنید تا با آن باز شود و کنترل پنل دامنه شرکتی که از آن دامنه خریده اید نیز چنین امکاناتی ندارد که معمولا ندارند.

ابتدا دامنه خود را در یکی ار ده ها سرویس دهنده مانند کلود فلر ، کلود  فراند ، کلودان اس و... ثبت می کنید و  NS های دامنه خود را در کنترل پنل دامنه شرکت اولیه به NS های کلود تغییر می دهید.

برای مثال آدرس آی پی هاست شما یا کامپیوتر شما یا آی پی ولید شما 11.12.13.14 است.

برای مثال قدم به قدم:

 

Set NS on the domain registrant to PNS1.CLOUDNS.NET
On CLOUDNS.NET, add an A record for gilas.ir something like book.gilas.ir
Point book.gilas.ir to 11.12.13.14
By entering book.gilas.ir, this IP address or your server will be opening without any subdomain-registration.

 

موافقین ۰ مخالفین ۰ ۰۷ اسفند ۰۱ ، ۱۱:۳۷

از cPanel هاست بخش نرم افزار،  MultiPHP INI Editor و Configure PHP INI basic settings در صفحه ای که باز می شود مقدار حداکثر آپلود را بالا می بریم:

upload_max_filesize	The maximum size of an uploaded file.

 

موافقین ۰ مخالفین ۰ ۱۳ دی ۰۱ ، ۱۴:۴۲

برای تغییر فونت باید در ابتدای کد css کدهای لود شدن فونت دلخواه را اضافه کرد و در بخش های دیگر کد نام فونت مورد نظر را در تگ های بادی و غیره  اضافه کرد. برای مثال برای فونت وزیرمتن اینگونه عمل می کنیم. vazirmatn.woff2 و vazirmatn.ttf

 

@charset "utf-8";
/* CSS Document - v3.0.4 */

@font-face{
	font-family:vazirmatn;
	 src:url('https://bayanbox.ir/download/34701678160162951/vazirmatn.woff2') format('woff2'),
	     url('https://bayanbox.ir/download/74713432485294685/vazirmatn.ttf') format('truetype');

		 }
*
{
	font-family:vazirmatn, Tahoma, "Times New Roman";
}

این ردیف در بالا و ابتدای کدها وارد می شود.

 

 

 

موافقین ۰ مخالفین ۰ ۰۹ دی ۰۱ ، ۱۸:۰۸

صابر راستی کردار مدت هاست فونت های فارسی و عالی را توسعه داده است از این آدرس می توانید دانلود کنید.

 

https://rastikerdar.github.io/

https://rastikerdar.github.io/compare-fonts/

https://rastikerdar.github.io/vazirmatn/

 

 

موافقین ۰ مخالفین ۰ ۰۹ دی ۰۱ ، ۱۸:۰۴

ابتدا دامنه اصلی خود را که داریم، در cloudflare ثبت می کنیم

سپس دی ان اس های کلود فلر را در کنترل پنل دامنه خود در بخش مدیریت دامنه ثبت می کنیم برای چک کردن اینکه آیا دامنه های کلودفلر  در مدیریت دامنه ثبت شده است از whois.sc استفاده میکنیم تا بفهمیم دی ان اس ها مال کجاست.

سپس به کلود فلر باز می گردیم و در بخش تنظیمات دی ان اس یک ساب دامین ثبت میکنیم مثلاً book و آن را پویپت میکنیم به آدرس سروری که داریم،‌ ip آن را میزنیم و پروکساید را فعلا خاموش میکنیم در این حالت آدرس که با این ساب دامین ثبت کرده ایم به طور کامل به سرور پوینت می شود

در بخش ssl/tls حالت فول مود را انتخاب می کنیم

در بخش network حالت وب سوکت را روشن می کنیم.

سپس در بخش dns پروکساید را روشن میکنیم

 

منطق کار

منطق کار این چنین است که تمام درخواست هایی که برای باز کردن یک دامنه وارد می شود به سوی کلادفلر میرود و  میتوانیم بی نهایت ساخت دامین ایجاد کنیم که آن ساب دامین ها را به آی پی سرور های گوناگون پوینت کنیم.

 

یک چیزه جالب این است که با پینگ کردن آدرس سرور اصلی و هاست اصلی نمایان نمی شود اینجا آدرس های کلادفلر را بازمیگرداند

موافقین ۰ مخالفین ۰ ۰۵ دی ۰۱ ، ۲۲:۱۶

۱- بروزرسانی وردپرس همیشه

۲- استفاده از پسوردهای پیچیده برای ادمین

۳- تغییر دادن مسیر لاگین ادمین وردپرس

۴- بکاپ گیری منظم

۵- استفاده از پلاگین امنیتی WordFence

۶- فعال کردن ورود دو مرحله ای

۷- محدود کردن ورودهای ناموفق

۸- بالا بردن امنیت php براساس ورژن

۹- بررسی سلامت سایت از طریق ابزار Health Check خود وردپرس

۱۰- استفاده از CDN کلود فلر و یا آبرآروان برای جلوگیری از حمله های DDos و فایروال ابرآروان

موافقین ۰ مخالفین ۰ ۱۱ تیر ۰۱ ، ۱۴:۲۹