Adding a site in a Subdirectory
-
How do we install a site/wp/blog into a subdirectory?
Normally I create another directory in the mydomain.com and install WP there or html.
e.g. mydomain.com/site1
Thanks!!!Posted 11 months ago # -
not sure I understand you, Anthony.
procedure is the same as for the manual WordPress install guides, only change your path accordingly, to be reflected also in the virtualhost file.
.. but I suspect that's not what you mean?
Posted 10 months ago # -
I think you answered it. I'm basically building WP site in the subdirectory of mydomain.com.
So just use the path in the vhost files like "http://mydomain.com/site"?
hhaha - hope we're talkin the same thing.
Posted 10 months ago # -
So I'm at this stage of adding a domain into a subdirectory of a domain...
Here's what I'm doing.
sudo nano /usr/local/nginx/sites-available/readipress.com/Avantetech
I can't save the file after putting the Vhost info...
Getting the error msg "/usr/local/nginx/sites-available/readipress.com/Avantetech: not a directory
All I'd like to do is build a site and use the following readipress.com/Avantetech
HELP! :)
Posted 10 months ago # -
Anthony, follow "Create the Site File Structure" in:-
http://vpsbible.com/web-servers/serve-multiple-sites-blogs-with-virtual-hosts/
In the same tut it won't hurt to also follow "Add Users, Groups & Permissions" .. you'll likely get some errors saying you've already got this user or that group but no worries, that's OK, no harm done and you'll have the correct permissions.
Also in the same tut, follow "Make Homepage(s)" and "Create the Virtual Host Files & Symlinks"
You'll have to restart Nginx and php, as shown in the tut too.
Basically, though, bear this is mind. A folder is a folder (well, technically it's a file but that's being pedantic). You want a folder within another folder, below the site root .. fine, just let Nginx know in the site's config file, the virtual host.
(aah, you see, you'd have known all this had you not been lazy and run the easy script instead of going the long haul through the guides ;) )
Posted 10 months ago # -
Hahah - but I totally understand and know your guides and scripts inside out. So much so I got a few versions of my own now. However, something is not right.
I'll double check my work. I treated it like any other domain. I just did 6 websites with your script today and this subdirectory fiasco is killing me. :)
So basically all you are saying is there is no difference between mydomain.com and anotherdomain.com/subsite..
Will try again after a good night's sleep.
Ant
Posted 10 months ago # -
No matter which way I go, script or guide, when I create the /sites-available/mydomain.com/subsite, I still get the error (not a directory).
Seems like it's expecting a ".com" extension at the end?
I can not create "mydomain.com/subsite" in the name of file that needs to be in the sites available folder.
However, I already installed the subsite into the location
/home/user/public_html/mydomain/public/subsite.
When I go to browse it I can see the home page when I type mydomain.com/subsite
But the pretty links don't work at the subsite level.
Hope this rambling made sense. If you need specific details, LMK.
Thanks!
Posted 10 months ago # -
So I gave up on trying to get "http://mydomain.com/subsite" to work. I followed your Subdomain tut and everything worked. :)
Posted 10 months ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
