阿里雲網域名稱繫結IP

2022-05-06 23:03:08 字數 2067 閱讀 5665

前提條件:擁有乙個阿里雲網域名稱,擁有一台自己的伺服器,並且知道ip,我的是nginx

1.登陸阿里雲

2.選擇網域名稱與**,會看到自己擁有的網域名稱,比如我的是moryingxiao.com

3.點選左側是解析

4.點選紅色的新增解析

5.記錄型別為a,主機記錄為www,記錄值為自己的ip位址,然後點選儲存

6.等待10分鐘

7.在自己的伺服器上找到nginx.conf,不知道在**的可以執行命令find / -name nginx.conf

8.9.進入nginx.conf,在最下面一行看到

include /etc/nginx/conf.d/*.conf;

每個人的實際情況不同

10.進入當前目錄下的conf.d,新建立乙個more.conf檔案,名字可以隨便起

11.nginx.conf的配置內容如下

# the default server

server {

listen   80;

server_name  moreyingxiao.com   www.moreyingxiao.com;

#charset koi8-r;

#access_log  logs/host.access.log  main;

# load configuration files for the default server block.

include /etc/nginx/default.d/*.conf;

location / {

root /var/www/html/more;

index index.php index.html index.htm;

error_page  404              /404.html;

location = /404.html {

root   /usr/share/nginx/html;

# redirect server error pages to the static page /50x.html

error_page   500 502 503 504  /50x.html;

location = /50x.html {

root   /usr/share/nginx/html;

# proxy the php scripts to apache listening on 127.0.0.1:80

#location ~ \.php$ {

#    proxy_pass   

# pass the php scripts to fastcgi server listening on 127.0.0.1:9000

location ~ \.php {

root /var/www/html/more;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_split_path_info ^(.+\.php)(.*)$;     #增加這一句

fastcgi_param path_info $fastcgi_path_info;    #增加這一句

fastcgi_param  script_filename  $document_root$fastcgi_script_name;

include fastcgi_params;

# deny access to .htaccess files, if apache's document root

# concurs with nginx's one

#location ~ /\.ht {

#    deny  all;

13.由於不是很熟悉nginx的配置,所以只是大概配置

主要就是servername配置為自己的網域名稱,並且location下面的root根目錄路徑指向。

這裡我指向的是/var/www/html/more

14.在/var/www/html/新建立乙個more資料夾,裡面建立乙個index.html,隨便輸入一些資訊

15.在**欄輸入自己的網域名稱就可以訪問到對應的資訊了

阿里雲網域名稱和ip繫結步驟

網域名稱解析 記錄和關係型資料庫中記錄的含義相同,就是表中的一條資料,記錄值就是網域名稱對應的ip 不要前面www主機的網域名稱解析,將網域名稱解析為example.com 不帶www 填寫 或者不填寫 dns網域名稱解析伺服器,如果是本地需要自己配置乙個dns伺服器,如果是遠端,比如阿里雲,我們現...

阿里雲OSS繫結自己網域名稱

首先我們需要有乙個自己的備案網域名稱,以baidu.com為例。在阿里雲的test的bucket 中找到外網訪問網域名稱為 test.oss cn beijing.aliyuncs.com 僅為例子,以自己實際的為準 在bucket 的網域名稱管理中繫結網域名稱,如圖 上圖的 使用者網域名稱為自己設...

網域名稱IP繫結

首先具備3個前提 買伺服器並搭建環境 阿里雲官網購買阿里雲的伺服器 我購買的是window系統,ecs伺服器 在自己的雲伺服器上布置上jdk,配置環境變數 安裝上tomcat mysql。購買網域名稱 根據個人情況,在阿里雲官網上買乙個有意義的網域名稱。購買 實名認證 備案 這個階段花費時間較長,需...