Install Wordpress di VPS sudah, tapi domain gak nyambung.


Status
Not open for further replies.

YokoWasis

Poster 2.0
maksudnya untuk memastikan kalo domainnya sudah terarah ke IP yang benar.. jadi kalau https://namadomain.tld:8083 bisa diakses, artinya https://namadomain.tld juga sudah bisa diakses

Ni sudah di jelaskan. Kalau akses CP masih pake IP berarti masih belum paham sama sekali gimana cara kerjanya vps, control panel, hostnae, domain, dan DNS Record. Jadi sebenarnya salah besar kalo ngomongnya "sudah bisa apapun"
 

Bestariweb Hosting

Hosting Guru
The Warrior
Verified Provider
bedanya di langkah nomor 2 ya mas.. mksh infonya
Bedanya install web di VPS pakai panel dan non panel bukan hanya di Nomor 2 saja, tapi:

dengan panel: nambah domain tinggal klik menu add domain atau add account, maka konfigurasi virtualhost akan terbentuk sendiri.
tanpa panel: untuk nambah domain harus create virtualhost manual. misal kalau pakai apache nano /etc/apache2/sites-available/namadomain.tld.conf kemudian enable site dengan: a2ensite namadomain.tld && service apache2 reload

dengan panel: semua DNS Record akan terisi secara otomatis saat add domain
tanpa panel: perlu add zone manual di /etc/bind/zones (kecuali tanpa Named server / pakai cloudflare)

dll
 

Mrs.JJ

Beginner 2.0
Step simplenya :
A. Jika pakai panel
1. Install OS yg ingin digunakan
2. Kemudian install web hosting panel manager yg ingin digunakan,
---->>Pastikan web servr sdh jln dgn baik, bs ditelnet dari luar
---->>Pastikan database server sdh jln dgn baik,
---->>Pastikan service dns servernya sdh jln dgn baik jika menggunakan internal dns
3. Masuk ke panel domain tempat mas order domainnya, buat childname IPnya arahkan ke IP VPS, misalnya :
ns1.entahapa.com ke 1.2.3.4
ns2.entahapa.com ke 1.2.3.4
4. Kemudian rubah NS/nameserver domainnya mas ke : ns1/ns2.entahapa.com,
5. Sambil menunggu domainnya mas resolv ke IP VPS bisa angsur2 upload data2 webnya akses via IP saja dlu,
6. Untuk mengecheck apakan settingan DNSnya mas sdh bnr bs dicheck di intodns.com
7. Selanjutnya silahkan proses install WPnya
8. Done
9. CMIIW

A. Jika non panel
1. Install OS yg ingin digunakan
2. Kemudian install web server yg ingin digunakan, semisal apache/nginx/tengine/etc
---->>Pastikan web servr sdh jln dgn baik, bs ditelnet dari luar
---->>Pastikan database server sdh jln dgn baik,
---->>Pastikan service dns servernya sdh jln dgn baik jika menggunakan internal dns
Pastikan firewal tdk memblok service yg untuk diakses dari luar
3. Masuk ke panel domain tempat mas order domainnya, buat childname IPnya arahkan ke IP VPS, misalnya :
ns1.entahapa.com ke 1.2.3.4
ns2.entahapa.com ke 1.2.3.4
4. Kemudian rubah NS/nameserver domainnya mas ke : ns1/ns2.entahapa.com,
5. Sambil menunggu domainnya mas resolv ke IP VPS bisa angsur2 upload data2 webnya akses via IP saja dlu, dan jangan lupa bagusnya pakai vhost
6. Untuk mengecheck apakan settingan DNSnya mas sdh bnr bs dicheck di intodns.com
7. Selanjutnya silahkan proses install WPnya
8. Done
9. CMIIW

Saya curiga step 3 ke bawah mas blm proses makanya domainnya ga resolv ke IP VPSnya, jika di rasa sudah info domainnya apa agar bs dibantu check bareng2
Step Five: Configuring Nginx to serve Wordpress
Let's start our Wordpress installation by creating an Nginx server block for our site.

sudo nano /etc/nginx/sites-available/wordpress

Paste the following code there:

server {
listen 80;

root /var/www/wordpress;
index index.php index.html index.htm;

server_name domain.com;

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}


location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location = /favicon.ico {
access_log off;
log_not_found off;
expires max;
}
location = /robots.txt {
access_log off;
log_not_found off;
}

# Cache Static Files For As Long As Possible
location ~*
\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$
{
access_log off;
log_not_found off;
expires max;
}
# Security Settings For Better Privacy Deny Hidden Files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Return 403 Forbidden For readme.(txt|html) or license.(txt|html)
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
return 403;
}
# Disallow PHP In Upload Folder
location /wp-content/uploads/ {
location ~ \.php$ {
deny all;
}
}
}

This is a well tuned Wordpress configuration file with permalinks support. Save (Ctrl+O) and close the file (Ctrl+X). Let's enable the server block by symlinking:

sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress

Next, we'll delete the Nginx default server block.

sudo rm /etc/nginx/sites-enabled/default

Now, we'll tune the main Nginx configuration file:

sudo nano /etc/nginx/nginx.conf

Make sure that the number of worker processes is equal to the number of cores in your instance.

user www-data;
worker_processes 1;
pid /run/nginx.pid;

Add use epoll; to the events block.

events {
worker_connections 4096;
multi_accept on;
use epoll;
}

Add client_max_body_size and server_tokens off directive. Set keepalive_timeout to 30 seconds.

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;
server_tokens off;
client_max_body_size 100m;


# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

Make sure that the whole Gzip settings block looks like this:

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

Save (Ctrl+O) and close the file (Ctrl+X). Then restart the server:

sudo service nginx restart

Step Six: Configure PHP
If you want to upload files more than 2mb to your WordPress site, you have to increase PHP upload size variables in php.ini.

sudo nano /etc/php5/fpm/php.ini

Now, press Ctrl+W and search for "upload_max_filesize" and set it to 100m.

upload_max_filesize=100M

Do the same with post_max_size. post_max_size needs to be the same size or larger than upload_max_filesize.

post_max_size=100M

Restart PHP.

sudo service php5-fpm restart

Step Seven: Setting up the MySQL database
In this step, we'll create the database user and tables. Go ahead and log into the MySQL shell:

mysql -u root -p

Log in using your MySQL root password. We will need to create a WordPress database, along with a user in the database. First, let's make the database (feel free to give it whatever name you like):

CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)

After that, we need to create a new user. Please replace the database, name, and password with whatever you prefer:

CREATE USER wordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)

Set a password for your new user:

SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)

Finish up by granting all privileges to the new user. Without this command, the WordPress installer will not be able to start up:

GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:

FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit the MySQL shell:

exit

Step Eight: Installing the WordPress files
We're almost done. Let's proceed to installing WordPress.

First navigate to the site root directory:

mkdir /var/www/
cd /var/www/

Now, download the latest version of WordPress:

wget http://wordpress.org/latest.tar.gz

Extract it from the archive:

tar -xzvf latest.tar.gz

Give the permissions of /var/www/wordpress to www-data user. It will allow future automatic updating of WordPress plugins and file editing with SFTP.

sudo chown -R www-data:www-data wordpress/
sudo usermod -a -G www-data www-data

saya pakai ini mas, dan bisa akses ip wordpress nya, dan untuk biar bisa akses domainnnya, saya ganti yang di
sudo nano /etc/nginx/sites-available/wordpress [ server_name domain.com ny jadi hostname sama domain saya] nah itu bisa diakses domainnya, tapi kayaknya itu jadi double, bisa akses pakai ip sama domainnya. nah untuk ftp dan fungsionalitas lainnya kayak yang pakai panel atau seperti biasanya, apa yang harus diinstall mas? saya coba pakai ftp masuk ke root gak ada file apa apa, cuma ada ini



aMjEn3q
 

Attachments

  • Untitled22.png
    Untitled22.png
    10.9 KB · Views: 3

Mrs.JJ

Beginner 2.0
Ni sudah di jelaskan. Kalau akses CP masih pake IP berarti masih belum paham sama sekali gimana cara kerjanya vps, control panel, hostnae, domain, dan DNS Record. Jadi sebenarnya salah besar kalo ngomongnya "sudah bisa apapun"
"bisa apapun" dalam artian bisa lakuin apapun selama tutorial yang ada jelas gak putus putus mas.
 

Bestariweb Hosting

Hosting Guru
The Warrior
Verified Provider
saya pakai ini mas, dan bisa akses ip wordpress nya, dan untuk biar bisa akses domainnnya, saya ganti yang di
sudo nano /etc/nginx/sites-available/wordpress [ server_name domain.com ny jadi hostname sama domain saya] nah itu bisa diakses domainnya, tapi kayaknya itu jadi double, bisa akses pakai ip sama domainnya. nah untuk ftp dan fungsionalitas lainnya kayak yang pakai panel atau seperti biasanya, apa yang harus diinstall mas? saya coba pakai ftp masuk ke root gak ada file apa apa, cuma ada ini
1. file yang di SS itu ada di folder /root sedangkan web ada di /var/www/
2. kalau mau ada fungsi named server, ya install BIND atau powerDNS atau software sejenis.
tutorial bind9: https://www.bestariwebhost.com/cara-membuat-cdn-sendiri-dengan-bind-dan-geoip/
atau https://www.bestariwebhost.com/vps-tutorial-cara-setting-bind9-di-vps-ubuntu-14-04/
3. Kalau mau pakai FTP non root, tinggal install proFTPD dan add user
4. Kalau mau ada filemanager, install net2ftp aja, terus set alias di nginx atau apache supaya semua domain/filemanager mengarah ke net2ftp
dll

nginx kalo mau simple pakai vestacp custom install (gunakan nginx + php-fpm)
 

YokoWasis

Poster 2.0
"bisa apapun" dalam artian bisa lakuin apapun selama tutorial yang ada jelas gak putus putus mas.

Kalau maksud nya adalah tutorial dari install control panel , setting domain, install wordpress semua dalam 1 tutorial ya memang Ndak ada.

Itu tugas nya kita buat nyambung. Karena memang kebutuhan tiap orang beda beda. Kalau mas nya sudah berhasil install control panel , sudah bisa login via nomor IP. Selanjutnya adalah setting A record domain ke nomor IP vps nya. Dan ini bakal beda beda caranya tergantung domain registrar nya. Dan tidak bakal di temukan tutorial nya "di bawah " cara instalasi Vesta cp. Karena yang buat tutorial Vesta cp belum tentu domain registrar nya sama dengan punya mas.

Kalau A record nya sudah ngarah ke IP vps dan sudah bisa login pake domain (bukan IP lagi) . Langkah selanjutnya gampang. Tinggal klik klik add domain add database jadi WordPress.
 

Mrs.JJ

Beginner 2.0
Kalau maksud nya adalah tutorial dari install control panel , setting domain, install wordpress semua dalam 1 tutorial ya memang Ndak ada.

Itu tugas nya kita buat nyambung. Karena memang kebutuhan tiap orang beda beda. Kalau mas nya sudah berhasil install control panel , sudah bisa login via nomor IP. Selanjutnya adalah setting A record domain ke nomor IP vps nya. Dan ini bakal beda beda caranya tergantung domain registrar nya. Dan tidak bakal di temukan tutorial nya "di bawah " cara instalasi Vesta cp. Karena yang buat tutorial Vesta cp belum tentu domain registrar nya sama dengan punya mas.

Kalau A record nya sudah ngarah ke IP vps dan sudah bisa login pake domain (bukan IP lagi) . Langkah selanjutnya gampang. Tinggal klik klik add domain add database jadi WordPress.

saya mah dns yang di digitalocean tambahin ke namecheap, yang di vestacp diarahin ke ip vpsnya, salah ya mas? nuhun, untuk yang FQDN pada saat installasi script itu isi hostname atau domain? kebanyakan orang pakai IP makanya saya kosongkan saya FQDN nya

Edit : access domain udah bisa pakai cara yang diatas tadi mas.
 
Last edited:

Mrs.JJ

Beginner 2.0
ini bisa diakses via ip mas, gimana caranya biar hanya bisa diakses domain, biasanya kalau udah install domain, diakses ip gak bisa
 
Status
Not open for further replies.

Top