Web Server FAQ

What Apache Modules come with InterWorx Control Panel?

cgi, cgid, authz_user, authn_file, auth_basic, authz_groupfile, authz_host, cache, disk_cache, mem_cache, ext_filter, include, deflate, log_config, env, mime_magic, cern_meta, expires, headers, usertrack, unique_id, setenvif, proxy, proxy_connect, proxy_ftp, proxy_http, mime, dav, status, autoindex, asis, info, suexec, dav_fs, vhost_alias, negotiation, dir, actions, speling, userdir, alias, rewrite, evasive20.

Can I enable/disable the ones I want or add more?

All bundled modules are enabled by default. Yes, you may disable modules you are not using or install your own.

How do I enable suPHP?

suPHP is a tool for executing PHP scripts with the permissions of their owners. This makes it possible for PHP scripting in a shared web environment to be much more secure; however, this comes with a performance penalty.

To enable suPHP server-wide:

  1. Click the Icon System Services menu item if it is not already open.
  2. Click the Icon Web Server menu item.
  3. Scroll down to the PHP Integration Mode section.
  4. Choose "PHP Scripts run as SiteWorx user" from the menu.
  5. "Update".
It is extremely unsafe to enable mod_php and mod_suphp at the same time. This configuration option is server-wide, and may cause permissions issues with existing client sites.

Where is the apache configuration file?

InterWorx Control Panel uses the standard Apache configuration file, located in

/etc/httpd/httpd.conf

This file controls some server wide variables, however this file may be overwritten during an update so if you edit it make sure to keep a backup copy for your reference.

Each domain is controlled through a virtual host file located in

/etc/httpd/conf.d

The file is named the same name as the domain in question with a .conf on the end.

e.g /etc/httpd/conf.d/mydomain.com.conf

In general it is best not to edit the httpd.conf file because it may be overwritten in an InterWorx Control Panel upgrade.

AllowOverride is set to "all" by default so you can override any global settings that you need to with an .httpaccess file.

I just opened the the httpd.conf file and at the end where the virtual hosts are supposed to be, it is blank. What's wrong?

Nothing is wrong -- InterWorx gives each domain its own configuration file located in

/etc/httpd/conf.d

The files are named the same name as the domain in question with a .conf on the end.

e.g mydomain.com.conf

Where are the virtual host configuration files located?

Each domain is controlled through a virtual host file located in

/etc/httpd/conf.d

The files are named the same name as the domain in question with a .conf on the end.

e.g mydomain.com.conf

Where are InterWorx Apache settings located?

Some InterWorx apache settings are set in /etc/httpd/conf.d/iworx.conf

Where is the Apache Controller (apachectl)?

The Apach Controller (apachectl) is /usr/sbin/apachectl

(While this is not really a config file, you will need this if you are planning to install the FrontPage extensions).

Where is the PHP configuration file (php.ini)?

The standard php.ini is /etc/php.ini

Many of its settings can be be edited from NodeWorx in InterWorx 2.x

InterWorx uses its own instance of PHP. Its config file is located at /home/interworx/etc/php.ini

Can I edit InterWorx's php.ini?

The standard php.ini is /etc/php.ini and this is safe to edit.

Many of its settings can be be edited from NodeWorx in InterWorx 2.x

InterWorx uses its own instance of PHP. Its config file is located at /home/interworx/etc/php.ini

DO NOT EDIT THIS FILE WITHOUT CONSULTING WITH THE INTERWORX DEVELOPERS.

Where is Perl installed?

perl is installed in /usr/bin/perl (many install scripts ask this)

Where is the Perl configuration file (perl.conf)?

perl.conf is in /etc/httpd/conf.d/perl.conf

Can I override Apache default settings on a per domain basis? A directory by directory by directory?

Yes, AllowOverride is set to All by default in httpd.conf and the virtual host configuration files.
Settings in httpd.conf may be overridden in the virtual host configuration files or by the creation of a .htaccess file.

Settings in the virtual host configuration files may be overridden by the use of a .htaccess file.

What is the default AllowOverride setting in Apache?

Both httpd.conf and the virtual host configuration files have AllowOverride set to All by default allowing custom settings through the use of a .htaccess file.

What is .htaccess?

.htaccess is a file that you create in a web accessible directory to override default Apache settings on that directory and all of the directories inside of it. [If you don't want this, you need to create another .htaccess file in the subdirectory changing the setting you changed back to the default.] If the directory is writable by the web server you can create a .htaccss file from the File Manager.

The most common uses of .htaccss are to changed the DirectoryIndex and to enable apache's mod_rewrite module to get user and search engine friendly url's, but there are many other uses.

.htaccess uses the same code syntax as any other apache configuration files. To create a .htaccess file simply create a simple text file with the apache code syntax you want to use in it and save it as ".htaccess" (without quotation marks, note the period) in the directory you want the settings to be effective in. Most people do this in the root html directory of their site but it can also be used in subdirectories.

NOTE: When you create a .htaccess file in the root of your site it also effects your subdomains since they are physical sub directories of your main site.

What is the skel httpd.conf file and what do I do with it?

The apache skel file sets defaults for new SiteWorx accounts. If you want some custom code in all future virtual host configuration config files, edit this file.

/home/interworx/etc/vhost-base.conf

WARNING: DO NOT EDIT THE SuexecUserGroup SETTINGS. DOING SO WILL CRIPPLE ANY NEW ACCOUNTS.

I loaded the IP of my server when I got the box and it showed a default InterWorx page but now it shows one of my domains and each IP shows a different one. What's up?

By default InterWorx Control Panel shows the first domain (alphabetically) on that IP when you call the IP in your browser. If there are no domains on that IP then it will show the default InterWorx page that you saw.

Is it possible to view my web page before the DNS is resolving?

Yes, your web page is visible at the following url:

http://<ip_address>/~<siteworxuser>/

where <ip_address> is the IP address that the domain is assigned to and <siteworxuser> is the Linux user assigned to your domain (normally the first 8 letters of the domain name, omitting punctuation and spelling out numbers).

[NOTE: InterWorx 1.8 and later only]

How is creating a SiteWorx account called forum.mysite.com different from just creating the subdomain forum within the mysite.com SiteWorx account?

Creating a subdirectory will simply create a forum directory inside the html directory for the subdomain's files.

/home/mysiteco/mysite.com/html/forum/

While creating the SiteWorx account forum.mysite.com will have the same functionality as any other SiteWorx account. It will have it's own Linux user and home directory completely separate from mysite.com

/home/mysiteco/mysite.com/html/
/home/forummys/forum.mysite.com/html/

Are there any limitations on SiteWorx accounts created with a subdomain?

No. They have the same functionality as any other fully qualified domain name.

Can I point a pointer domain to a subdomain?

Yes, you can point a pointer domain to a SiteWorx account created with a subdomain.

No, you can not point a pointer domain to a subdomain created within the same SiteWorx account.

Is it possible to change the port InterWorx Control Panel runs on?

Yes, but it should only be done in extreme cases such as if you are behind a firewall and do not have access to opening the correct port. Make sure to find a port that you know is open and not being used by something else to minimize conflicts.

To change the port InterWorx runs on, two files must be edited VERY CAREFULLY:
Open the file

/home/interworx/etc/httpd/httpd-custom.conf

In this file, change all instances of 2443 to the port you wish to use:

##
# Ports that InterWorx-CP uses
##
<IfDefine SSL>
Listen 2443
</IfDefine>

and

<VirtualHost _default_:2443>
SSLEngine on
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

Then do the same thing in:

/etc/httpd/conf.d/iworx.conf
RewriteEngine on
RewriteRule ^/siteworx(/)?$ https://%{HTTP_HOST}:**2443**/siteworx/?domain=%{HTTP_HOST} [R,L]
RewriteRule ^/nodeworx(/)?$ https://%{HTTP_HOST}:**2443**/nodeworx/ [R,L]
#RewriteRule ^/webmail(/)?$ https://%{HTTP_HOST}:**2443**/webmail [R,L]

and

ProxyPass /webmail http://127.0.0.1:2080/webmail
ProxyPassReverse /webmail http://127.0.0.1:2080/webmail
ProxyPass /horde http://127.0.0.1:2080/horde
ProxyPassReverse /horde http://127.0.0.1:2080/horde
ProxyPass /squirrelmail http://127.0.0.1:2080/squirrelmail
ProxyPassReverse /squirrelmail http://127.0.0.1:2080/squirrelmail

Save the files and restart the iworx and httpd services:

service iworx restart
service httpd restart

If you have a firewall installed on your server, remember to open up the port that you are now running InterWorx on or you will not be able to access your box.

Is there any way to create custom error message files?

Currently InterWorx does not support this "out of the box" but it will be added to a future release. In the meantime here is the workaround.

If you want ALL sites to use the same error message file names:

1) Put the following at the very end of the /etc/httpd/conf/httpd.conf

ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

YOU WILL NOT NEED TO EDIT ANYTHING IN THE FILE, ONLY ADD THIS TEXT.

2) Restart the apache web server, via NodeWorx or at the command line:

service httpd restart

3) Create the error files in the users web space. For example, if you create a 404.html in the user's html directory, 404 errors will show that page.

Each user will be able to create/edit his or her own error pages. If there is no 404.html file in the user's account then a generic 404 error will be displayed.

If you want each site to be able to specify it's OWN error message file names:

To do this you create a .htaccess file in the user's html directory, with one of the following lines, if you only wanted to override 404 errors.

ErrorDocument 404 /404.php
Or
ErrorDocument 404 /404.shtml
Or
ErrorDocument 404 /index.htm

etc. for each error.

Where is the SKEL directory?

/home/interworx/etc/skel

Where is the skel httpd.conf file?

/home/interworx/etc/vhost-base.conf