Creating Drupal Multisite with Subdirectory from different Domain - drupal

I'm attempting to create Drupal Multisite. Currently lets say we have below Live Sites in the form
abc.example.com
def.example.com
xyz.example.com
All the Sites are present on the Same server (Nginx Server) in the directories
/var/www/vhosts/abc.example.com/httpdocs
/var/www/vhosts/def.example.com/httpdocs
/var/www/vhosts/xyz.example.com/httpdocs
Now we have to create Blogs for each Live Site, we are looking into Drupal Mutlisite Architecture for the same, so all Sites should point to same codebase, which would ease our maintenance tasks.
We have currently created symlinks for to main/default domain Site directory which is installed at blogs.example.com so symlink is created as
ln -s /var/www/vhosts/blogs.example.com/httpdocs/ /var/www/vhosts/xyz.example.com/httpdocs/blog
And created a folder under sites as sites/xyz.example.com.blog
But when we open the URL in browser we get "No input file Specified"
We are not sure if the above error is due to some issue in .htaccess, also we are consfused where to add htacess configuration related to MutliSite.
Any help would be appreciated.

As explained here your symbolic link shall be under /var/www/vhosts/blogs.example.com/httpdocs as the installed directory as well as the created sites folder. Try also to remove the end slash on httpdocs/ on your symbolic link:
ln -s /var/www/vhosts/blogs.example.com/httpdocs/ /var/www/vhosts/xyz.example.com/httpdocs/blog
to httpdocs only, like so:
ln -s /var/www/vhosts/blogs.example.com/httpdocs blog
or do it in 2 lines command:
cd /var/www/vhosts/blogs.example.com/httpdocs
ln -s . blog
Make sure also that CNAME of both xyz.example.com and blogs.example.com are the same and that the xyz.example.com is set as ServerAlias to blogs.example.com on your vhost. So you should get your site when point your browser to http://xyz.example.com/blog.
Once you have login to your new site as the admin, check or put the correct path for Public file system path under the following admin menu to sites/xyz.example.com.blog/files:
Home » Administration » Configuration » Media » File System

Related

AWS Lightsail Wordpress Version control

I'm working on a wordpress site hosted on an AWS Lightsail instance (Bitnami) and i'd like to have version control to work on our site themes with a coworker.
I like the idea of just having to git pull to make changes to the site.
In the wordpress folder (that contains wp-admin, licences, wp-config.php, etc...), there is the wp-content folder but it's a symbolic link that points outside the wordpress folder to root/bitnami/wordpress/wp-content. I can't use git in the wordpress folder but I can set it up in the root/bitnami/wordpress/wp-content but it feels like bad practice since it asks me for admin privileges for every command line.
Is there a reason the wp-content folder is a symbolic link that points to outside the wordpress folder or is it just a mistake from the person who set things up?
Is it okay to use git to bypass an ftp client in this case?
So I just had this same issue today, and I resolved this by moving the directories for .../wp-content to the location of the symlinks and deleting the symlinks.
This was my process (though you could delete the symlinks first):
Move wp-content mv /bitnami/wordpress/wp-content /location/of/wordpress/temporary-directory-name
Delete symlinks rm -f /location/of/wordpress/
Rename temporary-directory-name using move mv /location/of/wordpress/temporary-directory-name /location/of/wordpress/wp-content
You can then repeat the same steps for the wp-config.php file. Once this was done I was able to verify Wordpress was still working on my LightSail instance. Hope this helps

Can't install wordpress on localhost

Every time I'm trying to install wordpress from the address: localhost/wordpress
It's showing the "Parent Directory"
Apache/2.4.29 (Win32) OpenSSL/1.0.2l PHP/7.1.11 Server at localhost Port 80.
Can anybody give me a solution?
From your screenshot, it looks like you have no files in your localhost/wordpress directory. You can follow the steps on this Codex page - https://codex.wordpress.org/Installing_WordPress - to guide you through the install process. You first need to download and unzip the WordPress files from https://wordpress.org/download/ into your local folder. You also need to have PHP installed locally, set up a database and a user, and edit your wp-config.php file before you can access localhost/wordpress to run the install. It's all detailed in that Codex page.

Point Domain to directory of a Bitnami Wordpress Multi-Site Instance

I am using a Wordpress Multi-site instance on AWS Lightsail and have a couple different Wordpress sites hosted with no issues (in the same instance).
I would like to host another website to the same Bitnami instance, but this domain does NOT have a Wordpress site. It is just a standard PHP website.
I assume that I need to point the nameservers to the AWS servers, but I am not sure how to specify what directory to point the non-Wordpress domain to.
For my Wordpress domains, I was able to use the "Sites" feature in Wordpress to configure multiple Wordpress domains.
Since this new domain isn't going to be a Wordpress site, do I need to modify the httpd-vhosts.conf file or something else? What specifically do I need to add?
Bitnami Engineer here. You can copy the WordPress configuration files to a new folder
sudo mkdir -p /opt/bitnami/apps/myapp/{conf,htdocs}
sudo chown -R bitnami:daemon /opt/bitnami/apps/myapp/htdocs
sudo cp -r /opt/bitnami/apps/wordpress/conf/*.conf /opt/bitnami/apps/myapp/conf/
and then perform the following changes
Edit the configuration files inside the /opt/bitnami/apps/myapp/conf/ directory. The httpd-prefix.conf should configure the Alias directive and you need to remove the DocumentRoot (remember to change the paths to the new ones). The httpd-app.conf should configure the Directory where your application is (remember to change the paths to the new ones)
Include the new httpd-prefix.conf file in the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf file
Restart Apache
sudo /opt/bitnami/ctlscript.sh restart apache
You can obtain more information in our documentation guide
https://docs.bitnami.com/aws/apps/wordpress/administration/create-custom-application-php/

How to upload WordPress child theme to XAMPP + Bitnami + Mac OS?

Everything was going so well: installed XAMPP on Mac (OS 10.10.2). Installed Bitnami WordPress module. Imported existing WordPress site (this site is already live). Then imported/installed the theme I want to modify. All good up to that point.
Now I want to create a child theme. Following the instructions from Themify, which are great. BUT: I can't open the htdocs directory within the wordpress dir that was installed by the Bitnami module. No permissions.
There's a help page, but it's not helping me. Reason 1: I open FileZilla, I FTP to localhost, but the wordpress dir is nowhere to be found there. Reason 2: I try to follow their sudo chown instructions but the path is not valid for me. I tried:
$ sudo chown daemon:daemon Applications/XAMPP/xamppfiles/apps/wordpress/htdocs
... but no luck. "No such file or directory." I can find this folder in the Finder (see screencap), but I can't seem to access it from the command line. (Is that because XAMPP is in the Applications directory?)
In case it's not obvious, I am doing all this to muck around with my child theme offline. But I can't get my child theme folder into the wp-content/themes folder, because I can't FTP or access the folder directly through the Finder.
I was able to change permissions through the Mac "Get Info" panel. Doh!!
"Get Info" panel, unlocked
See screencap.
Try and put a Leading slash at the front of the directory listing so run this instead:
sudo chown daemon:daemon /Applications/XAMPP/xamppfiles/apps/wordpress/htdocs
Just go to /Applications/XAMPP/xamppfiles/htdocs/mysite/wp-content/themes/your-child theme and set permission of your child theme folder to writable to everyone.

Drupal Site Download : Not able to install site as-is

I recently downloaded a fully functional drupal(6) site using FTP. Though I installed the Drupal instance, I got the modules and the themes that were in the sites/all folder, but wasn't able to get the actual site configuration ( Configuration and Settings of those modules )
Any help in this regard would be greatly appreciated.
Assuming this is a follow-on of: Drupal Site install on localhost after downloading source using FTP
If you get the Drupal install screen when accessing a site you've just migrated to your localhost, it's likely because you're trying to access the site locally using a URI that's different than the remote site AND this URL does not fall within the directories that Drupal searches when looking for a settings.php file (see comments starting about line 20 in the default.settings.php file of the sites/default folder).
You have two options:
Option 1: Create a symbolic link on your localhost that points requests to your local URI to the directory hosting the live site. This would look something like this:
ln -s /path/to/webroot/sites/default/ /path/to/webroot/sites/mydevsite.dev
Option 2: Create a sites/sites.php file that maps URI's to the correct folder hosting your settings.php file. For example, you'd add this to sites/sites.php if you left your settings.php file in the sites/default folder:
$sites['mysite.dev'] = 'default';
$sites['www.mysite.dev'] = 'default';
$sites['mysite.com'] = 'default';
$sites['www.mysite.com'] = 'default';
Simply put, this translates into: "Serve sites mysite.dev, www.mysite.dev, mysite.com, and www.mysite.com from the folder located at sites/default."
I usually use the second option. It's more sustainable, OS independent, and can be committed to source control.
Update based first 5 comments:
You need to edit the .htaccess file in your Drupal install. Look for this section:
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
And do as it says, uncomment out the line and set it to your subdirectory.
Yes the steps are correct. Is it the design that is not coming or is the functionality of views missing? If its only the css that is not coming, then the issue could be that your theme is not getting applied. Check if the theme folder correctly exists, and disable/enable the theme.

Resources