<![CDATA[ Error 503 Site Temporarily Unavailable - MODX Community Forums]]> https://forums.modx.com/thread/?thread=95849 <![CDATA[Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518774 This is a project I have been working on for some time. I'm slowly getting over each hump as I come to it.
Sorry this is so long winded but I reckon more is better and may save a lot of questions.

My Goal is to move a copy of my Production Web page onto a private Development server.
The production page was written by an external company and is still hosted on their web server.
They have given me ftp access to the files and a backup of mySql in a dump.sql

I plan to develop / update some content on my development server and then move it into production once tested.

Development Machine
===================
I'm have installed Modx Revo version 2.2.6-PL which is the same version production. I copied the setup folder off the production server and ran it. Setup connected to my local My local MYSQL db no problem. This was restored from a dump.sql file.

The server is running Debian Wheezy. Apache is version 2.2.22 and PHP is Version 5.4.4-14+deb7u3.

All the static files that make up my web pages were copied off production into development using FTP.
I have done a file compare of the contents of all files and nothing seems to be corrupted.

OK
The Problem
=============
when I load http://myIPaddress/index.php I received the following error
Error 503
Site temporarily unavailable

Almost the same thing when I try and load http:/myIPaddress/manager
It just says
Site temporarily unavailable

When I look into index.php it appears that the error comes from this section. (I edited the title text to be sure)
(both the index.php and /manager page show my edited title)

/* include the modX class */
if (!@include_once (MODX_CORE_PATH . "model/modx/modx.class.php")) {
    $errorMessage = 'Site temporarily unavailable';
    @include(MODX_CORE_PATH . 'error/unavailable.include.php');
    header('HTTP/1.1 503 Service Unavailable');
    echo "<html><title>Error 503: Site temporarily unavailable</title><body><h1>Error 503</h1><p>{$errorMessage}</p></body></html>";
    exit();
}


My model/modx folder is actually not of the web server root folder.
It is located here core/model/modx

This folder structure is matching on both production and development.
The mysteries of htaccess still allude me at the moment but havn't had much time to figure it out so far.
From what I can tell all my htaccess files are named ht.access so should not have any effect.

Does anyone know what is going on here?]]>
pollardd Jan 19, 2015, 07:26 PM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518774
<![CDATA[Re: Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518876 I have a feeling it isn't that complicated. It will be something that is stopping my paths from forming correctly.
Either something in one of those config files or I have missed something in a .htaccess file.

I'll do some more digging tomorrow and perhaps I can find something in an error log that throws some light on this.

David.]]>
pollardd Jan 21, 2015, 04:49 AM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518876
<![CDATA[Re: Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518866
There may be two primary limitations: both are handled by the server. Concurrent Connections is one... Requests per Interval is another.]]>
sottwell Jan 21, 2015, 01:18 AM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518866
<![CDATA[Re: Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518862 I found those two settings. They were both set to 1
I have set them both to 0.
I restarted apache but the manager page still does not load correctly.

Any other ideas?

Thanks Again
David
]]>
pollardd Jan 21, 2015, 12:27 AM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518862
<![CDATA[Re: Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518858 sottwell Jan 20, 2015, 11:06 PM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518858 <![CDATA[Re: Error 503 Site Temporarily Unavailable]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518856 Thanks for the replies. I have followed your steps and I also found this document....
http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

It seems to detail what you are saying exactly. (Other documents I found earlier were incomplete)
I have carefully checked and updated all these files.

<Time Passes>

Apparently not carefully enough smiley
With the help of apache error log I found 3 typos' in my changes (arg!)

I ran the setup again it progressed to the end with no errors.

Some of my pages now load but not all of them.

The /manager screen look really plain like all the graphics and formatting have been removed.
When I view the source of my public web server /manager page I see the html code below.
You can see the /manager portion of the href= lines are missing.
The Manager Path in the file /var/www/core/config/config.inc.php looks good to me.
<Extract>
if (!defined('MODX_MANAGER_PATH')) {
$modx_manager_path= '/var/www/manager/';
$modx_manager_url= '/';
define('MODX_MANAGER_PATH', $modx_manager_path);
define('MODX_MANAGER_URL', $modx_manager_url);
}

<head>
	<title>Manager Login</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
    <link rel="stylesheet" type="text/css" href="/manager/assets/ext3/resources/css/ext-all-notheme-min.css" />
	<link rel="stylesheet" type="text/css" href="/manager/templates/default/css/xtheme-modx.css" />
	<link rel="stylesheet" type="text/css" href="/manager/templates/default/css/index.css" />
    <link rel="stylesheet" type="text/css" href="/manager/templates/default/css/login.css" />
    
    <script src="assets/ext3/adapter/ext/ext-base.js" type="text/javascript"></script>
    <script src="assets/ext3/ext-all.js" type="text/javascript"></script>
    <script src="assets/modext/core/modx.js" type="text/javascript"></script>

    <script src="assets/modext/core/modx.component.js" type="text/javascript"></script>
    <script src="assets/modext/util/utilities.js" type="text/javascript"></script>
	<script src="assets/modext/widgets/core/modx.panel.js" type="text/javascript"></script>
    <script src="assets/modext/widgets/core/modx.window.js" type="text/javascript"></script>
    <script src="assets/modext/sections/login.js" type="text/javascript"></script>
    
    <meta name="robots" content="noindex, nofollow" />
</head>


Yet my development server looks like this
<head>
	<title>Manager Login</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
    <link rel="stylesheet" type="text/css" href="/assets/ext3/resources/css/ext-all-notheme-min.css" />
	<link rel="stylesheet" type="text/css" href="/templates/default/css/xtheme-modx.css" />
	<link rel="stylesheet" type="text/css" href="/templates/default/css/index.css" />
    <link rel="stylesheet" type="text/css" href="/templates/default/css/login.css" />
    
    <script src="assets/ext3/adapter/ext/ext-base.js" type="text/javascript"></script>
    <script src="assets/ext3/ext-all.js" type="text/javascript"></script>
    <script src="assets/modext/core/modx.js" type="text/javascript"></script>

    <script src="assets/modext/core/modx.component.js" type="text/javascript"></script>
    <script src="assets/modext/util/utilities.js" type="text/javascript"></script>
	<script src="assets/modext/widgets/core/modx.panel.js" type="text/javascript"></script>
    <script src="assets/modext/widgets/core/modx.window.js" type="text/javascript"></script>
    <script src="assets/modext/sections/login.js" type="text/javascript"></script>
    
    <meta name="robots" content="noindex, nofollow" />
</head>


PS It seems that me running Setup again recreated the config.inc.php file again with the default values.

Any ideas what this means?


Let me know if you think I should start a new thread for this new error.

Thanks
David

]]>
pollardd Jan 20, 2015, 10:23 PM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518856
<![CDATA[Re: Error 503 Site Temporarily Unavailable (Best Answer)]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518790
There are four files you need to check. Three are config.core.php files, one in the installation root, one in /connectors/ and one in /manager/. Make sure they are pointing to the actual location of your /core/ folder. Then in core/config/config.inc.php make sure that all of the paths are correct, as well as the database connection information. For example, mine reads
define('MODX_CORE_PATH', '/Applications/MAMP/htdocs/revo232/core/');


Look out for the path to /assets/, it's near the bottom of the config.inc.php file and easy to miss. Also take care to check the $dbase_dsn line up in the database connection section.]]>
sottwell Jan 20, 2015, 01:03 AM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518790
<![CDATA[Re: Error 503 Site Temporarily Unavailable (Best Answer)]]> https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518787 Did you run setup after moving the files? That will usually straighten out the paths.

If not, there are four files that tell MODX where things are:

These just point to the core directory:

config.core.php (modx root)
manager/config.core.php
connectors/config.core.php


This one has the all the paths to the parts of MODX:

core/config/config.inc.php








]]>
BobRay Jan 20, 2015, 12:57 AM https://forums.modx.com/thread/95849/error-503-site-temporarily-unavailable#dis-post-518787