COMMON ISSUES
Table of Contents
Access from Outside (Internet, LAN)
Binding to an IP Address (or another domain name).
WDController’s Module list is empty.
I reinstalled/recovered Vista.
PHP will not parse my PHP files.
PHP <? ... ?> tags do not work.
Importing Existing Web Applications
Importing / Exporting between Local System and Host
URL Locations of Web Applications
Tomcat Component will not install by default.
I cannot install Tomcat6 on my Vista OS, can you help me?
Configuration: other than localhost
ASP.NET does not seem to work.
Text within configuration files is jumbled.
Apache cannot bind to port 80 on my system.
Resolving Domain Names Globally
Resolving Domain Names Locally
Can you give me a few tips on how to set mod_rewrite into debug mode?
I’ve created a domain (or Virtual Host), but it doesn’t seem to be public?
1. Make sure that the domain you have registered is resolving to the IP address of the public/WAN IP of the Server.
2. Make sure that the native Windows Firewall is allowing C:\www\Apache22\bin\httpd.exe pass-through (Exception for the Apache HTTP Server).
3. Log into your router and 'port forward' ports 80 and 443 from WAN-side to the local LAN IP of the Server.
One way to figure out if this problem is a result of Apache (vs. the network), is to check Apache's access log and error log files located under folder C:\www\Apache22\logs\.
If Apache *is* receiving your requests, you will...
1. See those requests under file access_global.log
2. See Apache denying permission to access those URLs under file error.log [if this is a permissions problem]
Otherwise, the requests from outside the local system are not reaching the Server.
Also note that the Virtual Host 'localhost' has a C:\www\vhosts\localhost\.htaccess file with lines:
# Deny access to everyone but the
local system
order deny,allow
deny from all
allow from 127.0.0.1
This configuration will only allow access from the local system (but the requests will still be logged).
Right now no one else can access my site from outside, they keep getting a 403 Forbidden page? What have I not done?
Note: At this point we can assume this is not a router/firewall/network issue as the request is passing through to Apache. Verify this by accessing the appropriate log file under folder C:\www\Apache22\logs\. You should see lines that start with an IP address other than 127.0.0.1 [which is you] and have entries such as "[client ip-address] client denied by server configuration:."
A 403 Forbidden message means that access to this folder/domain is being restricted by Apache in some way.
Are there any .htaccess files under this domain folder (or any of its direct parent folders)?
An .htaccess file with lines...
order allow,deny
deny from all
…
OR
order deny,allow
allow from 127.0.0.1
…would block requests coming from outside the local system.
Another possibility is that this domain is part of a custom Virtual Host configuration that you have created, in which the directory permissions where omitted / never granted.
See HTTP/1.1 Status Code Definitions: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
I just installed the Suite and tried to follow the Guide to set up a website. I am able to access C:\www\vhosts\_dynamic\example.com\www\ from a browser by typing in example.com
I can only due this locally. What needs to be done in order to make this page accessible from the internet?
example.com [the provided Suite example domain] is a special case DNS domain that is being overridden locally via the Windows Hosts file. You will never be able to access it from outside your system.
My problem is that I can't seem to get Virtual Host localhost to resolve to an external IP address. Yes, I know that localhost is 127.0.0.1 and that you can't change that IP -- but that is not my question -- I simply want my external (public) IP to be served. How do I do that?
1. Edit configuration file C:\www\Apache22\conf\extra\httpd-vhosts.conf
[Use WordPad or another editor to open this file. Notepad tends to display everything on one line due to some of the line-endings]
2. Locate the ‘localhost’ Virtual Host block.
[It's the first VirtualHost block in this file, with line ‘ServerName localhost’]
3. Edit line:
ServerAlias 127.0.0.1
…to…
ServerAlias 127.0.0.1 your.ip.address your.domain.name
4. Save file. Restart Apache.
5. Remove (or empty the contents of) file C:\www\vhosts\localhost\.htaccess; It has lines:
# Deny access to
everyone but the local system
order deny,allow
deny from all
allow from 127.0.0.1
Which will block access to anyone but the local system.
Note: You can also have localhost respond to multiple IPs and domain names by appending the ServerAlias string.
http://localhost/ does not work!
By default you should see an ‘index of’ page listing a few files under this URL.
If this URL is not displaying anything for you in your browser, Apache might not have started. There could be several reasons for this, and we can track them down:
1. Make sure the Apache Service has installed:
a. Run 'services.msc', find Service name Apache2.2
b. Is the 'Status' field blank or 'Started'?
2. Make sure it's the Suite’s own Apache2.2 Service:
a. Double click the Service name, check the 'Path to executable:' field.
b. It should be "C:\www\Apache22\bin\httpd.exe" -k runservice"
3. Check the contents of file C:\www\Apache22\logs\error.log.
If Apache attempted to start and failed, there should be useful messages in this file.
Apache, MySQL and PHP are installed and running. I can access http://localhost/ successfully. But where do I put my files?
The localhost DocumentRoot folder is C:\www\vhosts\localhost\_\
This folder maps to URLs http://localhost/ and http://127.0.0.1/
The Suite installed very easily and works great so far. I am wondering, though, how I get the Suite, Apache and PHP module to install. All I get as an empty list under the WDController.exe application. The modules are not loaded when I launch the program.
If you are using Vista and have UAC turned on (this will be on by default), right click the WDController.exe application and select 'Run as Administrator.'
This should show the Apache and MySQL Services as installed and should list the modules loaded.
You might also need to reboot your system after the initial installation.
There is also a chance that Vista did not allow the Apache and MySQL Services to install. In which case you should uninstall the Suite, turn off UAC, install, and turn UAC back on… Or use a full administrative account when installing.
I reinstalled/recovered Vista over the top of the existing Windows system, which means all my files remain on the system but (for example) the registry is all new. Now the Suite is not working.
On your Vista reinstall:
1. The Apache and MySQL Services were removed from Services.
You can check this by running ‘services.msc’ and looking for the Apache2.2 and MySQL Service names.
2. The system path to the installed components has been removed.
You will need to install the services and update the System PATH manually.
I added my *.html files to C:\www\vhosts\localhost\_\ and now they are available at http://localhost/
However, the PHP code on these pages will not run.
By default the Suite is only configured to parse PHP code in files named with the *.php extension, as parsing all files regardless of type degrades performance.
Renaming your *.html files with the *.php extension should allow the PHP code to run.
If you require PHP to parse other file types, such as *.html and *.htm files, edit configuration file C:\www\Apache22\conf\extra\suite-global\suite-php5.conf
Update line: AddHandler application/x-httpd-php .php
To: AddHandler application/x-httpd-php .php .html .htm
Save file. Restart Apache.
Note: Make sure your Editor saves this file as suite-php5.conf and not as suite-php5.conf.txt
Note: Make sure your Folder Options are not hiding file extensions…
1. Open a folder view such as C:\www\vhost\localhost\_\
2. Under the Folder Menu select Folder Options.
3. Select the View tab.
4. Make sure 'Hide extensions for known file types' is *not* selected.
5. Apply to all Views.
Other notes: When testing, makes sure you are accessing your PHP files through a browser and not directly through a system folder; also make sure to clear your browser cache.
PHP short tags are turned off by default. Either update configuration file C:\www\php5\php.ini to allow them, or use <?php … ?> instead.
1. Open the command line (run 'cmd.exe').
2. Change to the C:\www\php5 directory...
cd \www\php5
3. Execute 'go-pear.bat' on the command line.
This should start the process that will set up PEAR on your system.
Next, append the PEAR installation directory C:\www\php5\PEAR\ (or the directory you selected) to the include_path directive in your php.ini configuration file (under folder C:\www\php5\)…
include_path = ".;C:/www/php5/includes/;C:/www/php5/PEAR/"
You should also add the PEAR directory to the system PATH.
See: http://pear.php.net/manual/en/installation.getting.php
After you have downloaded and installed PHP, you have to manually execute the batch file located in e.g. c:\www\php5\go-pear.bat. The setup will ask you some questions and afterwards the PEAR Package Manager will be installed in the path, which you have specified during installation. Finally you have to add that installation path to your PATH environment. Either do this manually (Start > Control Panel > System > Environment) or run (double-click) the newly generated PEAR_ENV.reg that's now found in the PHP source directory. After that you can access the PEAR Package Manager by running the command pear in a Windows Command Prompt.
I get "index of" section for some web sites and URLs. How do I stop people from seeing this kind of information?
Any URL accessed folder that does not contain an index.html or index.php file will generate an 'index of' list. To avoid this:
1. Create an ".htaccess" file and place it within the Virtual Host folder (ex: C:\www\vhosts\_xxx\domain\)
2. Edit file .htaccess and add this line within it:
Options -Indexes
This will disable listing/index of directory files for every directory and sub-directory within the folder structure.
You can also place this file directly in folder C:\www\vhosts\ to disable Indexes for *all* Virtual Hosts.
Note: If you are having a difficult time creating a file that starts with a prefix of ".", name it anything else first (such as htaccess.txt), open it with WordPad, and use 'Save as' to save it as ".htaccess".
How do I remove the powered by Apache, PHP, etc… string I see on 404 / ‘page not found’ responses?
Example:
--------------------------------------------------------------------------------
Apache/2.2.6 (Win32) mod_ssl/2.2.6 OpenSSL/0.9.8g mod_aspdotnet/2.2 PHP/5.2.5
Server at MY IP Port 80
##################
To remove the Server Signature string edit configuration file C:\www\Apache22\conf\extra\httpd-default.conf and change line:
ServerSignature On
to...
ServerSignature Off
Save file. Restart Apache.
See: http://httpd.apache.org/docs/2.2/mod/core.html#serversignature
To create custom error pages you can use the ErrorDocument directive inside a VirtualHost block.
See: http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
My index pages are all index.htm pages, not index.html. I noticed that Apache will not pick up on the index.htm file.
If you are using index files other than index.html or index.php, you can edit file C:\www\Apache22\conf\httpd.conf and update this part:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
To include index.htm:
<IfModule dir_module>
DirectoryIndex index.html index.php index.htm
</IfModule>
Save file. Restart Apache.
I need the system to have includes in htm, html and shtml files if possible because I want to use includes for headers, footers and formatting and all of the pages will need these items.
Under httpd.conf, for the localhost directory, make sure that the Options line is set to 'ALL' (or at the least 'Includes'). Update original block with:
<Directory "C:/www/vhosts/localhost">
Options All
AllowOverride All
Order allow,deny
Allow from all
AddType text/html .htm .html .shtml
AddOutputFilter INCLUDES htm html shtml
</Directory>
Save file. Restart Apache.
Note that mod_security has occasionally been known to break SSI on Apache, turn this module off when troubleshooting.
If I install any of the web apps, like Wordpress, etc, are those available to all created domains? If so, how does it differentiate users, etc, between the different hosts?
The Suite’s installer places Wordpress, and the other web applications, under the ‘localhost’ Virtual Host only.
You can use our step-by-step Guides to install web applications under other Virtual Hosts.
If you install another instance of Wordpress for any other domain, you will need to differentiate it with a separate database name and database user & password.
Note: The “shared” web applications such as AWStats and phpMyAdmin are installed under a URL alias with a code-base that is shared among all Virtual Hosts / domains.
I'm running an internal web server to host my web apps (Drupal, MediaWiki, phpBB, etc...). Your package looks good since I wouldn't need to worry about additional add-ons. Is there a way to install your package without wiping out my existing web applications (or their configuration and data)?
You should not have any trouble moving your existing web applications to the Suite.
After Suite installation, you can either:
A. Use our instance of the web applications, and import your data directly into them.
B. Copy-and-paste your existing web application folder directly into a Virtual Host folder and import the database.
You will need to take into account the database names, database user names, and perhaps a few lines in the configuration files between the original web application and the Suite’s instance of it.
I have created a website in Drupal 6.2, and exported it to my web host. They are now asking me to export the tables from the MySQL database to the host site so it can run on their MySQL system. It looks like I will have to do this every time I make a change to the site on my home PC. I didn't realize it was going to be this complicated!
Drupal is primarily a database-driven web application. All the content/pages (and most settings) are stored in a database. Nothing is stored in the file system except the: codebase, modules, and themes.
The database name used for Drupal under the Suite is 'drupal'. It should display in the database list under the phpMyAdmin tool.
You can export the Drupal database into an SQL file, upload that file to your host, and import it there.
In your particular case, you should use the Suite as a local environment to: explore and get comfortable with Drupal, create a base Drupal site, test/install a module, develop a theme, etc...
Once you have your base set up, export it to your host. Then you can directly create and update content on your live site.
The alternative, as you have pointed out, of having to transfer the database for small and ordinary changes/updates is too cumbersome and complicated. But for everything else, the local environment is the ideal setup.
Also note that just as you can transfer the database from the local system to the live site, you can do the same backwards.
I would like to be able to export my MySql database for the Drupal test site I have, but I just haven't been able to -- could you take me through the steps.
Run 'cmd.exe', and within shell enter:
1. C:
2. cd \
3. mysqldump --user=root --password=rootwdp drupal > drupal.sql
This will:
1. Change to the C drive.
2. Change to the root folder. Ex: to C:\.
3. Backup a database named 'drupal' to a file named 'drupal.sql'. This file will be save as C:\drupal.sql. You can rename or move this file afterwards.
You can also use phpMyAdmin to perform the same task via a GUI.
Note that Drupal (and other web applications) might or might not hardcode paths or domain names into the database [vs. just reading those settings from a configuration file]. If after you transfer the DB to host you see broken links, you might need to update a field within that DB. Check the source code of the page in your browser to spot problem ‘http://’ lines when troubleshooting.
I’ve recently installed the Suite and I’m unable to see installed applications like WordPress and Drupal using the localhost URL.
You should be able to see Joomla, Drupal, WordPress, Mediawiki and phpBB from URLs of:
i. http://localhost/joomla
ii. http://localhost/drupal/install.php
iii. http://localhost/wordpress
iv. http://localhost/mediawiki
v. http://localhost/phpbb3
See: http://www.devside.net/download/suite-guide/index.html#webapps
If you can't see the above URLs you might have inadvertently selected the minimum install (the scroll wheel on a mouse can cause this on that setup step).
Also make sure you have rebooted after the initial installation.
I would like to use MySQL GUI Tools 5.0 to control MySQL, but when I launch the program it tells me it can't find the service or the startup variable, so it disables most of the control functions.
“Either the service or the configuration file could not be found. Startup variables and service section are therefore disabled.”
Is there something that I am not doing that would correct this problem?
I can use phpMAdmin, but I would prefer the GUI tools.
The MySQL GUI tools have a difficult time finding where the my.ini configuration file and the mysqld-nt.exe binary are located.
You should be able to specify the mysqld-nt.exe binary and my.ini path locations under the MySQL GUI tools’ Configuration Tab.
Input C:\www\mysql5\bin\mysqld-nt.exe and C:\www\mysql5\my.ini
You can also fix this problem by making a registry change and changing the entry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MySQL\ImagePath
From "C:\www\mysql5\bin\mysqld-nt.exe" MySQL
to…
"C:\www\mysql5\bin\mysqld-nt.exe" --defaults-file="C:\www\mysql5\my.ini" MySQL
The Perl Package Manager (PPM) is only available for installing pre-compiled Perl modules for the ActiveState brand of Perl: ActivePerl. ActiveState's license does not allow 3rd parties to redistribute their package of Perl, so we have to use "vanilla" (standard) Perl instead. [The term 'Perl Package Manager' is very misleading as it implies that it is a type of a Perl standard Process]
To install Perl modules for standard Perl you would 1) use the CPAN repository, 2) download the module files, 3) and build and install the modules... This requires you to have a build environment on your system. Sometimes a full C/C++ compiler is required, other times only the program 'make'.
This is where PPM makes the difference as these modules have already been pre-compiled for you, or more specifically for ActivePerl. [The PPM module binaries might or might not be compatible with regular Perl]
If you would like to install and use additional Perl modules, it is a much simpler process of just replacing the Suite's “vanilla” Perl with ActiveState's ActivePerl.
Depending on how liberal the installer is for ActivePerl, you would basically want to rename folder C:\www\perl to C:\www\perl.old and install ActivePerl as C:\www\perl. It is important to keep this location as perl cgi-bin scripts have what's called a 'shebang' line. It is the first line of the file and it is of the form:
#!/www/perl/bin/perl
This line tells the Apache cgi-bin process where to look for the perl.exe binary.
If this location changes, you would need to update the Suite example Perl files and the awstats.pl file.
Notes:
The system Path needs to point to the proper location of the Perl binary.
In future versions of the Suite we will try to incorporate ActivePerl as it seems to offer a simpler process to the user. But this will greatly depends on the terms set by ActiveState for an OEM license.
http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/
I’ve tried installing this 3 times, on both Windows 2003 Server and Vista Ultimate, but no matter what the Tomcat component just will not install.
Everything else seems to install fine. Any ideas? Thanks!
Tomcat requires a few extra steps to be performed by the user after the installation.
See http://www.devside.net/download/suite-guide/index.html#tomcat
1) Have
you followed the instructions located here:
http://www.devside.net/download/suite-guide/index.html#tomcat
2) Have
you installed the JRE (Java Runtime Environment)?
From the command line [Run 'cmd.exe'], what does 'java -version' return?
3) Have
you set environmental variables: JRE_HOME, CATALINA_HOME?
From the command line [Run 'cmd.exe'], what does 'set' return for these
variables?
4) Check
to make sure the correct JVM path is being used:
Double-click file C:\www\Tomcat6\bin\tomcat6w.exe
Navigate to the Java tab.
Make sure that the 'Java Virtual Machine' is pointing to the correct folder of
your JVM, such as... 'C:\Program Files\Java\jre1.6.0_05\bin\client\jvm.dll'
5) Does the native Tomcat server at http://localhost:8080/ return anything?
I have followed your documentation to enable ASP.NET support ... works fine for localhost ... but not for the other Virtual Hosts.
Do I need to configure each Virtual Host separately or globally, and if so how ... and does it matter where my "test.aspx" file is located in the Virtual Host directory structure?
The mod_aspdotnet module is enabled globally, but the actual binding is done per directory and Virtual Host.
You can take a look at how this is accomplished in file C:\www\Apache22\conf\extra\vhosts\localhost\suite-aspdotnet-example.conf, which binds the URL /asp to the ‘_asp’ sub-folder under localhost.
The high level overview is:
For other Virtual Hosts, you would…
1. Duplicate the example configuration block and update the paths within.
2. Place that configuration into the configuration block for that Virtual Host -- directly or via an Included in configuration file.
3. Restart Apache for configuration changes to take effect.
I followed instructions to configure ASP.NET as informed, but it fails every time. I tried both v1 as well as v2. But noting seems to work. The Apache server works but not the ASP.NET host.
The instructions to enable mod_aspdotnet should work as-is unless something not configured properly:
See http://www.devside.net/download/suite-guide/index.html#mod_aspdotnet
You need to have .NET Framework version 2.0 installed on the system.
If the Windows folder on your system is C:\Windows, you do not need to edit any configuration files, just copy file suite-mod_aspdotnet.conf into folder conf\extra\suite-global\ and install Apache.Web.dll into the GAC as explained in the Guide. Restart Apache.
Also make sure you are doing this after you have rebooted after installing the Suite.
The contents of log file C:\www\Apache22\logs\error.log and any Windows event log entries could also be helpful in troubleshooting this issue.
When I open some of the configuration files in Notepad, they are all just jumbled together (with the carriage returns shown as blocks). Is there something else I should use besides Notepad to view these files?
This is a problem with the line-endings in the files.
There are two types of line-endings: Windows style and Unix style.
Notepad can only handle Windows style line endings. Otherwise it displays everything on one line with some odd characters thrown in.
You should use WordPad or an editor such as Notepad++ to open these files.
See: http://en.wikipedia.org/wiki/Newline
Software such as Norton and even Skype can block ports and cause problems.
You might also have IIS or another instance of Apache install and running on your system.
I don't know how to resolve my domain to my public IP address?
Use your Registrar's nameservers to resolve your domain name to your public/internet IP address (that your router or system receives from your ISP).
If you used namecheap.com as your Registrar:
Login to your account, into 'manage domains', click on example.com.
At this point Select 'All Host Records' under 'Host Management'.
You should see two lines:
Host Name @: represents example.com
Host Name www: represents www.example.com
Enter your public/internet IP address in the 'IP Address/URL' fields for both lines. Select 'A (address)' as the record type for both. Save changes.
The DNS might take a few hours to propagate.
How do I resolve a domain name locally for testing and development?
Edit Windows file C:\Windows\system32\drivers\etc\hosts and insert additional lines to resolve example.com and www.example.com to the system loopback IP address 127.0.0.1
127.0.0.1 example.com
127.0.0.1 www.example.com
My domain right now resolves to IP 192.168.1.1 but no one can see it?
The above is a local IP address and will only work inside your local network (LAN).
Either use your a) system, b) router or c) a site such as http://www.ip-adress.com/ to get your public/internet/WAN IP address.
How do I reinstall the Suite and keep my current sites and database?
You should backup everything first.
The simplest way to do this is stop both the Apache2.2 and MySQL Services, and make a zip copy of the 'www' folder to another location -- before performing the un-installation and re-installation. This way you have a preserved copy of everything.
The uninstaller will leave a few folders untouched…
1) The MySQL database [C:\www\mysql5\data\]
2) The webroot of Virtual Hosts [C:\www\vhosts\]
3) The Apache configuration files [C:\www\Apache22\conf\]
The installer for Suite version 3.01 will not copy over these locations or files.
Note that previous versions might remove the above folders on uninstall and overwrite the existing files in those folders on re-install.
Users have also reported success with simply reinstalling over the existing location.
I tried using AWSstats and I’m having an issue with it. According to the docs it looks like the alias ‘/stats/’ should automatically work for any website I dynamically create. I tried it on one of the sites today and get the following error:
Error: Couldn't open config file "awstats.domain.com.conf" nor "awstats.conf" after searching in path "C:/www/webapps/awstats/wwwroot/cgi-bin,/etc/awstats,/usr/local/etc/awstats,/etc,/etc/opt/awstats": No such file or directory
See Guide entry or contact support or our forums.
Edit configuration file C:\www\Apache22\conf\extra\httpd-vhosts.conf or the configuration file of the Virtual Host you are working with.
Within that Virtual Host block, add lines:
RewriteLogLevel 3
RewriteLog logs/rewrite.log
Save file. Restart Apache.
This will cause Apache to log what mod_rewrite is doing into file C:\www\Apache22\logs\rewrite.log.
See URL: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog
Is the self signed certificate secure enough for a production server?
A self-signed certificate is as secure as any authority-signed certificate. Just note that every user will receive a browser warning about the signing authority (you) not being trusted.
Can I create a self-signed certificate that lives more than 365 days? How about 2 years?
You can make the expiration date on a self-signed certificate anything you like.
Is there a way to do the verification and seal with a self signed certificate?
No. A self-signed certificate will never be trusted by a browser, as the signing party is you, and you are not in the browser's chain of trusted parties.
You can ask the users of your site to add you to the list, but this is only a good option on an intranet in an organization where every browser can be targeted from the start.
Can I install our existing or wild card commercial certificate into Apache?
Yes... As long as the domain Apache serves is the same domain name used in the certificate.