Have website with dedicated IP but getting IT Works when accessing domain

Discussion in 'ISPConfig 3 Priority Support' started by webguyz, Apr 13, 2015.

  1. webguyz

    webguyz Active Member HowtoForge Supporter

    Strange. I had a apache webite customer that wanted a SSL cert so I gave it a dedicated IP and everything looked good. Was working last night but this morning when I go to the website I am getting the generic 'It Works" message.

    I checked /etc/apache2/sites-enabled and see this which looks correct (below) Anybody know why I can't get to my website??

    <Directory /var/www/sh*******rex.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
    </Directory>
    <VirtualHost 72.**.**.113:80>
    DocumentRoot /var/www/clients/client53/web108/web
    ServerName sh**rex.com
    ServerAlias www.sh**rex.com
    ServerAdmin webmaster@sh**rex.com
    ErrorLog /var/log/ispconfig/httpd/shorttermforex.com/error.log
    Alias /error/ "/var/www/sh**rex.com/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html
    <IfModule mod_ssl.c>
    </IfModule>
    <Directory /var/www/sh**rex.com/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <Directory /var/www/clients/client53/web108/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    # suexec enabled
    <IfModule mod_suexec.c>
    SuexecUserGroup web108 client53
    </IfModule>
    <IfModule mod_fastcgi.c>
    <Directory /var/www/clients/client53/web108/cgi-bin>
    Order allow,deny
    Allow from all
    </Directory>
    <Directory /var/www/sh**rex.com/web>
    <FilesMatch "\.php[345]?$">
    SetHandler php5-fcgi
    </FilesMatch>
    </Directory>
    <Directory /var/www/clients/client53/web108/web>
    <FilesMatch "\.php[345]?$">
    SetHandler php5-fcgi
    </FilesMatch>
    </Directory>
    Action php5-fcgi /php5-fcgi
    Alias /php5-fcgi /var/www/clients/client53/web108/cgi-bin/php5-fcgi-72.**.**.113-80-shorttermforex.com
    FastCgiExternalServer /var/www/clients/client53/web108/cgi-bin/php5-fcgi-72.**.**.113-80-sh**rex.com -idle-timeout 300 -socket /var/lib/php5-fpm/web108.sock -pass-header Authorization
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
    ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:9117/var/www/clients/client53/web108/web/$1
    </IfModule>
    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
    AssignUserId web108 client53
    </IfModule>
    <IfModule mod_dav_fs.c>
    # Do not execute PHP files in webdav directory
    <Directory /var/www/clients/client53/web108/webdav>
    <ifModule mod_security2.c>
    SecRuleRemoveById 960015
    SecRuleRemoveById 960032
    </ifModule>
    <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
    </FilesMatch>
    </Directory>
    DavLockDB /var/www/clients/client53/web108/tmp/DavLock
    # DO NOT REMOVE THE COMMENTS!
    # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
    # WEBDAV BEGIN
    # WEBDAV END
    </IfModule>
    php_admin_value post_max_size 64M
    php_admin_value upload_max_filesize 64M
    </VirtualHost>
     
  2. webguyz

    webguyz Active Member HowtoForge Supporter

    IN the DNS I set the A record and WWW record to the dedicated IP address. Is that correct or should it be set to the IP of the server that the customers website is on. This is a multi-server system.

    Thanks!
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats should be ok. The IP is on the right server and assigned only to this website?
     
  4. webguyz

    webguyz Active Member HowtoForge Supporter

    I checked the web_domain in the master for this domain and there is only one entry for sh**rex.com and it has the dedicated IP set correctly. On the dbispconfig webdomain on that slave server the web_domain info is correct and matches what is on the master. DNS setting is set for the dedicated IP 72.**.**.113 for A, and WWW dns records and they ping correctly. Pulling my hair out on this one. Restarted apache but no help. Have lots of other websites on that server but none with a dedicated ip.

    The Domain is shorttermforex.com and the IP is 72.249.59.113. Everything resolves correctly.
     
    Last edited: Apr 13, 2015
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    I created a phpinfo file called test.php and was able to get to it by typing http://shorttermforex.com/test.php, but when I try accessing the index.php (its a wp site) it gives me the 'It Works' script. Could something else be causing my problem like a .htaccess file?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont get a it works page when I open the domain. I get a page that shows "I'am working hard to launch ...". maybe you have a wrong entry in the hosts file of your server?
     
  7. webguyz

    webguyz Active Member HowtoForge Supporter

    I renamed the .htaccess file in the /web folder and the site started working! Something in the .htaccess file is causing it to fail. Any hints where to start looking?
    ----------------------------------------- .htaccess --------------------------------------------------------
    # BEGIN optimizeMember GZIP exclusions
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} (^|\?|&)optimizemember_file_download\=.+
    RewriteRule .* - [E=no-gzip:1]
    </IfModule>
    # END optimizeMember GZIP exclusions
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
     
  8. webguyz

    webguyz Active Member HowtoForge Supporter

    That is what I am supposed to get and its working now. I commented out the first <ifModule in the .htaccess file and its seems to be flying right now.
     
  9. webguyz

    webguyz Active Member HowtoForge Supporter

    Darn it. The website started giving me the 'It Works' Page again. THought the commenting out of the .htaccess file fixed it but it did not
     
  10. webguyz

    webguyz Active Member HowtoForge Supporter

    The only way I could get this website to work was to add the dedicated IP and the domain into the /etc/hosts file on the slave web server. I have other dedicated IP websites on that same server and they work just fine without having to add the ip/domain into the /etc/hosts file. Would seem to be some sort of DNS issue but DNS works fine so I am stumped as to why adding it in this case made it work.

    Thanks!
     

Share This Page