I had a similar problem, but handled the VirtualHost configuration in a different way:
- Used an Apache mod_alias to redirect what for you is
/home/blog/
to a path outside of/var/www/railsapp/public/
(e.g.,/var/www/wordpress
) - Then, for that new hosted directory I had to declare
PassengerEnabled off
to avoid getting the standard rails error message.
I’ve wrote this up in more detail in a blog post about hosting wordpress in a rails subdirectory. My VirtualHost
declaration ended up looking like this:
<VirtualHost x.x.x.x:80>
...
DocumentRoot /srv/www/mydomain.com/public
Options FollowSymLinks
# an Alias for the wordpress blog
Alias /blog /srv/www/mydomain.com/wordpress
<Directory /srv/www/mydomain.com/wordpress>
PassengerEnabled off
AllowOverride all # make the WordPress .htaccess file work
Order allow,deny
Allow from all
</Directory>
...
</VirtualHost>
Related Posts:
- Error establishing a database connection on Installation
- Please explain how WordPress works with MySQL character set and collation at a low level
- Connect to database using wordpress wp-config file
- Accessing two databases
- Custom DB_COLLATE (collation) value not working on fresh install?
- Why can’t I swap a DB in a WP install? [closed]
- Can I have multiple database users within WordPress?
- Moving WP from local server to live, error establishing a db connection
- Connect to a remote database for wordpress in my own hosting server
- WordPress – Promoting A Dev Build In A Subdirectory To Production / Root Directory
- Switching Databases in LocalHost
- Localhost to Staging to Development Dynamic WP-CONFIG
- How to share plugin created database tables between two WordPress sites
- “Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen? [closed]
- Error message on blog posts only on my local environment [closed]
- Problem migrating to localhost
- Is my way to change WordPress server is correct?
- how to encyrpt DB_PASSWORD in wp-config
- Update WP install to WP network & it broke the DB connection
- How to direct my site to the proper URL without Dashboard
- can’t upgrade wordpress or install plugins, it seems to “think” it’s still on a local installation
- Can two domains use the same database?
- WordPress keeps redirecting to localhost
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- Duplicate database to roll back theme & content changes
- Confused over wp-config.php and ‘database user + database password + name’
- Cloned site not connecting to database – MAMP
- execute custom function on database connection error
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- I have include wp-config, should I add global $wpdb also?
- One WP Database outside localhost and two connections
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- Issue “Error establishing a database connection” problem.
- .htaccess and virtual host configuration for WP in its own directory
- /var/run/mysqld/mysqld.sock
- DB access blocked when initializing WP externally
- How to use remote db tables in current config? [duplicate]
- Multiple Address In WP-Option Value
- ERROR: “Table Prefix” must not be empty
- Can I connect WordPress website with an external database?
- wp-config was suddenly updated
- Checking if Database Table exists
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Is it possible to define two databases for one installation?
- How To Make Connection To WordPress Data Base In A Plugin?
- Improve or optimize a very slow query
- What is the advantage of separating wp_users and wp_usermeta table?
- Suppress subdirectory from WordPress Multisite primary URL
- “MySQL server has gone away” since update to 3.8
- WordPress page title repeated in SOME pages
- MySQL Syntax Error upon restoring database from backup [closed]
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- Use one WordPress database with multiple instances of one site
- Who is responsible for data sanitization in WordPress development?
- How to check if a core update, like 4.9.8 → 5.0, involves a database update (migration)?
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- I need to get an array from the wordpress database
- Moving minor updates between local and live sites – just database?
- what is the best way to store user created data?
- Using GROUP CONCAT in my-sql query with wp_usermeta table
- How to move the WordPress site Layout from test site to Production site?
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Retrieve data from the database to table such as comments in the admin control panel
- Need to store custom user information (many-many relationsips), preferably not as user meta
- charset problem with new custom table
- WordPress and user security
- How to connect to a remote database in WordPress?
- Migrating from PDO using SQLite to clean new install using MySQL
- Change WordPress URL in sql file via Terminal
- $wpdb->insert Giving duplicates
- Where is phpMyAdmin inside WordPress?
- What can I do when an outside party hacks into my weblog and changes my display name?
- How to delete database without using any plugin?
- Is database deleted on clicking “reinstall” button in WordPress updates?
- Fill custom select field with pages/post titles
- WordPress database products structure
- Files on Localhost, Database on Server
- How do I have a user upload a blog post and then retrieve that to display in a card on the site?
- Delete user with only subscriber role
- How to rename custom table name programatically in wordpress?
- How to edit custom table data in frontend
- pre_get_posts causings DB error when using ( ‘posts_per_page’, -1)?
- generate PDF from member information
- mysqli_query(): MySQL server has gone away for Curl Request
- Help posting values to DB on submit using $wpdb->query
- create a table using user meta custom data
- wpdb query to insert images in to post/page gallery
- Creating a database in my plugin not working
- How to create index (sql) to a meta_key?
- WPCLI search and replace in a particlar site dir effect another site-dir
- get_user_meta and umeta_id
- Send data to database after redirect (and popping out of iframe)
- Simple email input store in database
- Pulling values from a sepcific row in table
- import (migration) user database to wp-users
- Insert Extra fields added in the front end registration form to DB
- $wpdb->insert not working for last select option
- How to create a table [closed]
- WP Multisite Users Not Linking
- Query a meta key using an array of values where the database value is a string