How to install subdomain in a Digital Ocean Droplet

#1

How to install subdomain in a Digital Ocean Droplet.
I have already one site running and I want to kbnow how can i install a subdomain of my blog in the same droplet.
please help me urgently @GulshanKumar @AbhishekVerma @anon9455539

#2

same way, where you type domain you would be typing your subdomain… and pointing IP for subdomain using A record.

1 Like
#3

means there main domain and subdomain both should be there

#4

No, it should be seperate.

#5

yes you can point domain and subdomain on the same droplet

#6

I didnot get
Please tell me in detail
How to do it
Do I have to create in any new folder or what
And what about wp-config
And what should be the same process for from last wordpress installation process

#7

Check this tutorial

#8

But I have installed it in LEMP i mean NGINX

#9

Oh. Google it bro. Steps similar to you did before. Only you need to point domain on DNS & nginx.conf file and create a new folder for new domain

#10

Check /etc/nginx/ folder

#11

ok bro sure

#12

You don’t have enough knowledge in commands means just install CP.
My suggestion try vestacp

#13

Bro I know a little bit do i have to create a new wp-config.php for subdomain website

#14

It will be created automatically using ‘five min famous installation page’ of WordPress.

image

#15

[quote=“GulshanKumar, post:14, topic:8149”]
five min famous installation page’
[/quot
Sir couldnot get this

#16

Suppose my domain is sahu4you.com and i want to install wordpress and make subdomain like sahu4you.com/ask
Then how to do it?
@GulshanKumar

#17

create folder “ask” inside domain pointed directory.

  1. Download Wordpress from here https://wordpress.org/download/
  2. Upload it on ask folder
  3. Unzip it
  4. Now, Visit sahu4you.com/ask
  5. Config DB & everything

Done

1 Like
#18

Well, that is called subdomain Subdirectory.

It will require below configuration, else you may see 404.

location /ask {
index index.htm index.html  index.php;
try_files $uri $uri/ /ask/index.php?$args;
}

Then, follow as suggested by @svignesh1994

2 Likes
#19

sir i was trying to follow the method but site is not working

#20

Main site stopped working
Solved by removing subdirectory name from sites-enabled

1 Like