![]() This service is powered by the wonderful folks at Ngrok. VirtualHostX can now generate a "Public URL" for your websites that you can use to share them over the internet with another person or mobile device.Improvements to Dark Mode in macOS Mojave.Since then, we're now up to version 8.7.1 and have pushed out 28 app updates adding new features and squashing bugs. Upgrading to 2.8.2 and 2.8.VirtualHostX 8.0 was released last September.$292 per month-let's make that $500! Learn more The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX. Support the team building MODX with a monthly donation. ![]() Contexts as subfolders (from the forums: ).You should now be showing the page at the following URL:Ĭreate a ] link to the "Dev Docs" Resource in the "Dev Home" Resource. '/core/') Ĭlear your site cache again, refresh the Resource tree, and click 'Preview' on your "Dev Home" document. If the main domain is "up one level" on the filesystem, you should be able to use the following: define('MODX_CORE_PATH', dirname(dirname(_FILE_)). What is really important here is to make sure this line points to your MODX core folder: define('MODX_CORE_PATH', dirname(_FILE_). It should match the base_url context setting you set up earlier. Make sure that's set to /, not anything else. Find this line (near the top): RewriteBase / You'll only need to edit one line here (and maybe not at all). index.php ¶Įdit index.php, and find this line (near the end): $modx->initialize('web') Ĭhange 'web' to 'dev'. You'll need to copy 3 files from your MODX Revolution's root directory: Go create a "dev/" subdirectory in /home//public_html/ (or whatever base path your webroot is in). Now we're going to need to create the actual files to load the subdomain. Great! Restart your server (apachectl graceful). Obviously, if you're creating a different subdomain than, you'd want to change these values. Some Apache installs prefer you to put the IP address of the server in the VirtualHost and NameVirtualHost parameters - this is fine the important field is the ServerName. (If you're not using Apache, you can at least follow the same idea and customize it to your server.) Go to Apache's nf file, and add these lines, changing where necessary for your domain name: NameVirtualHost Manually editing the Virtual Hosts is not recommended. Creating the Virtual Host ¶ĬPanel will make the necessary changes automatically when you create a new sub domain. This allows MODX to know where to redirect 'web' context URLs back to.Īfter creating the settings, clear your site cache. If you're going to be linking back to the 'web' context from this context ('dev'), you'll want to add those same Context Settings (with 'web'-specific values, of course) to the 'web' context. All system settings can be overridden by setting them on a context. You can add other context-specific settings, such as error_page, unauthorized_page, cultureKey, and others if you so choose. Remember this setting is: scheme + http_host + base_url site_url - Set this to (or your subdomain url).site_start - Set this to the ID of your "Dev Home" resource.http_host - Set this to (or your subdomain name).base_url - Set this to " /" (no quotes) since we're making the root of the URL our base. ![]() Click on it, and you'll need to add a few settings: From here we'll see a Context Settings tab. Your tree should look something like this:įrom there, go ahead and right-click on the "dev" Context in the tree, and click "Edit Context". ![]() We'll use this to test our context links. Also, while you're at it, create a "Dev Docs" Resource as well with an alias of "documentation". Place it in the root of the "dev" context. Next, in the Resource Tree (to the left) create a "Dev Home" Resource. Click Create New to create a new context. We're going to create a subdomain at (of course, not really, but you get the idea). This tutorial will demonstrate how to use a Context to create and manage a separate subdomain in a single Revolution install.
0 Comments
Leave a Reply. |