Thank you for your time and help! Please if you could look over my settings and see what's going wrong.. I've read so much and tried soooo many things for 1 month now. I'm running: Linux Debian / apache2-mpm-prefork 2.2.9-10+lenny2
Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0
In case you don't know what Ajaxterm is: http://antony.lesuisse.org/software/ajaxterm/
I'm sure the problem lies in the configs putting into apache2. As Ajaxterm works on http://localhost:8022 & I don't get any errors when loading ajaxterm either. It also works if it reads from one vhost only.
The problem I am having if I make a new vhost file it will:
1) No matter what URL you enter it will show the AjaxTerm page/window
I'm sure this is because of this error: [warn] _default_ VirtualHost overlap on port 443, the first has precedence. < So it just ignores the other vhost settings.
If I add the configs to ssl file below existing configs
2) Ajaxterm won't work at all; if I go directly to it's path It produces a page with the top strip only of the ajaxterm window that says: Connection error status: 404
These are the steps I have done:
a2enmod proxy_http
apt-get install ajaxterm
/etc/init.d/ajaxterm start
It replied: Starting web based terminal: ajaxterm
pico /etc/ssh/ssh_config
//uncomment: PasswordAuthentication yes
cd /
mkdir /srv/ajaxterm
cd /srv/ajaxterm
htpasswd -cm /srv/ajaxterm/.htpasswd MyName
typed in pass...
1st: the method of making a new file(as per http://wiki.kartbuilding.net/index.php/Ajaxterm ) (this makes 'entire' site ajaxterm only):
pico /etc/apache2/sites-available/ajaxterm<note this file doesn't exist
In case it matters also note 'my.site' is replacing my actual domain which is in that format of my'.'site'.'org as it's a free dyndns domain
<VirtualHost *:80>
ServerName ajaxterm.my.site.org
Redirect 301 / https://ajaxterm.my.site.org
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
</VirtualHost>
<VirtualHost *:443>
ServerName ajaxterm.my.site.org
HostnameLookups Double
CustomLog /var/log/apache2/access.log combined env=!dontlog
SetEnvIf Request_URI "^/u" dontlog
ErrorLog /var/log/apache2/error.log
Loglevel warn
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
ProxyRequests Off
<Proxy *>
AuthUserFile /srv/ajaxterm/.htpasswd
AuthName EnterPassword
AuthType Basic
require valid-user
Order Deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8022/
ProxyPassReverse / http://localhost:8022/
</VirtualHost>
Then I:
a2ensite ajaxterm
/etc/init.d/apache2 reload
reply I get is: Reloading web server config: apache2 [warn] _default_ VirtualHost overlap on port 443, the first has precedence
and in apache2 error logs:
[warn] Init: SSL server IP/port conflict:ajaxterm.my.site.org:443 (/etc/apache2/sites-enabled/ajaxterm:8) vs. my.site.org:443 (/etc/apache2/sites-enabled/ssl:2)
line 8 would be: <VirtualHost *:443>
line 2 would be: <VirtualHost *:443>
2nd method after removing the above, adding to my existing ssl file (this makes ajaxterm not work at all):
pico /etc/apache2/sites-enabled/ssl
This is my entire file with configs for ajaxterm as the 2nd virtual host configs (as per http://wiki.kartbuilding.net/index.php/Ajaxterm ):
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName my.site.org
DocumentRoot /var/www/
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
AuthUserFile /etc/apache2/.htpasswd
AuthGroupFile /dev/null
AuthName "Authorization Required"
AuthType Basic
require user myname
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options -Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName ajaxterm.my.site.org
Redirect 301 / https://ajaxterm.mysite.org
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
</VirtualHost>
<VirtualHost *:443>
ServerName ajaxterm.my.site.org
HostnameLookups Double
CustomLog /var/log/apache2/access.log combined env=!dontlog
SetEnvIf Request_URI "^/u" dontlog
ErrorLog /var/log/apache2/error.log
Loglevel warn
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
ProxyRequests Off
<Proxy *>
AuthUserFile /srv/ajaxterm/.htpasswd
AuthName EnterPassword
AuthType Basic
require valid-user
Order Deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8022/
ProxyPassReverse / http://localhost:8022/
</VirtualHost>
I have also tried copy over ajaxterm dir to /www/ and with (as per http://bobcares.com/index.php/blog/?p=120):
<virtualhost *:443>
ServerName localhost
SSLEngine On
SSLCertificateKeyFile /etc/apache2/ssl/apache.pem
SSLCertificateFile /etc/apache2/ssl/apache.pem
ProxyRequests Off
<proxy *>
AuthType Basic
AuthName "remote Shell Access"
AuthUserFile /etc/apache2/.htpasswd
Require user myname
Order deny,allow
Allow from all
</proxy>
ProxyPass /ajaxterm/ http://my.site.org:8022/
ProxyPassReverse /ajaxterm/ http://my.site.org:8022/
</virtualhost>