Can anyone give me some pointers?
On 12/3/24 16:54, Java Jive wrote:
Can anyone give me some pointers?
What address does ping (et al.) use when you try to ping the sub-domains?
Determine if it's a name resolution issue or something else.
... showing I think that the translation of, for example, ...
local.localhost -> 127.0.0.2
... is no longer occurring.
to see if it's a resolver issue, rather than apache
In previous versions of Ubuntu, I had the following working arrangement
for defining localhost subdomains as follows ...
/etc/hosts:
127.0.0.1 localhost
127.0.0.2 local.localhost
127.0.0.3 publish.localhost
Note: In what follows, the files given below are links to files actually
in the sister directory sites-available, as per Apache standard
practice. Further, I've removed all the comments and blank lines to
save space.
/etc/apache2/sites-enabled/001-localhost.conf
<Directory "/home/www">
AllowOverride All
Require all granted
</Directory>
/etc/apache2/sites-enabled/002-local.conf
<VirtualHost 127.0.0.2>
ServerName local.localhost
DocumentRoot "/home/www/Local"
<Directory "/home/www/Local">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Local/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Local/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
/etc/apache2/sites-enabled/003-publish.conf
<VirtualHost 127.0.0.3>
ServerName publish.localhost
DocumentRoot "/home/www/Publish"
<Directory "/home/www/Publish">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Publish/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Publish/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
On 03/12/2024 23.54, Java Jive wrote:
In previous versions of Ubuntu, I had the following working arrangement
It's age ago I used apache, but still I think your setup is a bit odd...
I'm assuming that all apache modules has been configured correctly and
they load without errors.
for defining localhost subdomains as follows ...
/etc/hosts:
127.0.0.1 localhost
127.0.0.2 local.localhost
127.0.0.3 publish.localhost
I would have done:
127.0.0.1 localhost local.localhost publish.localhost
they do not need their own ip, specially not for apache.
Note: In what follows, the files given below are links to files
actually in the sister directory sites-available, as per Apache
standard practice. Further, I've removed all the comments and blank
lines to save space.
/etc/apache2/sites-enabled/001-localhost.conf
<Directory "/home/www">
AllowOverride All
Require all granted
</Directory>
If I remember it right, all the domains should be virtualhost when using virtual hosts, assign the ServerName to it too.
<VirtualHost *:80>
SeverName localhost
...
</VirtualHost>
/etc/apache2/sites-enabled/002-local.conf
<VirtualHost 127.0.0.2>
ServerName local.localhost
DocumentRoot "/home/www/Local"
<Directory "/home/www/Local">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Local/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Local/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
I would use
<VirtualHost *:80>
SeverName local.localhost
...
</VirtualHost>
/etc/apache2/sites-enabled/003-publish.conf
<VirtualHost 127.0.0.3>
ServerName publish.localhost
DocumentRoot "/home/www/Publish"
<Directory "/home/www/Publish">
Options +Includes +Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/www/Publish/cgi-bin">
Options +ExecCGI
</Directory>
<Directory "/home/www/Publish/Resources/Includes">
Options +ExecCGI
</Directory>
</VirtualHost>
<VirtualHost *:80>
SeverName publish.localhost
...
</VirtualHost>
Now trying to restore cgi-bin functionality - php is working, but perl and python not. Will post here if I need more help, meanwhile, thanks again.
On 2024-12-04 17:30, Java Jive wrote:
Now trying to restore cgi-bin functionality - php is working, but perl and python not. Will post here if I need more help, meanwhile, thanks again.
Those turned out to be the shebangs. The site files are identical to
those when the sites runs under localhost on a Windows machine, and in general this works very well. CGI files are the one exception I've ever found:
In Windows, the shebang has to be of the form ...
#!python
#!perl
... which, as long as the relevant executables are on the path, works fine.
However, in Linux, and on the final online site, even with the
executables on the path, the shebang has to include the full path ...
#!/usr/bin/python
#!/usr/bin/perl
Can anyone suggest a way of arranging things so that the same shebang
works for both? I tried defining a variable in Linux BIN=/usr/bin/,
which could be empty for Windows, and using an include arrangement in
the shebang ....
#!<!--#echo var='BIN' -->python
... but this didn't work
I can't speak for what works for Windows.Windows itself doesn't care about shebang lines, I'd leave them so
Theo wrote:
I can't speak for what works for Windows.
Windows itself doesn't care about shebang lines, I'd leave them so
they're valid for linux.
but add a "ScriptInterpreterSource" directive probably with "Registry-Strict" to your .conf files
<https://httpd.apache.org/docs/2.4/mod/core.html#ScriptInterpreterSource>
Then add registry entries with the path for each cgi interpreter you
want to invoke as e.g.
HKEY_CLASSES_ROOT\.py\Shell\ExecCGI\Command
Andy Burns wrote:
Windows itself doesn't care about shebang lines, I'd leave them so
they're valid for linux.
No, doesn't work I'm afraid. If I do that, the page rediirects to the
site error page, when I take out the path element of the shebang, it
works again.
Theo wrote:
I can't speak for what works for Windows.
Windows itself doesn't care about shebang lines,
I'd leave them so
they're valid for linux.
but add a "ScriptInterpreterSource" directive probably with "Registry-Strict" to your .conf files
<https://httpd.apache.org/docs/2.4/mod/core.html#ScriptInterpreterSource>
Then add registry entries with the path for each cgi interpreter you
want to invoke as e.g.
HKEY_CLASSES_ROOT\.py\Shell\ExecCGI\Command
On 2024-12-04 17:30, Java Jive wrote:
Now trying to restore cgi-bin functionality - php is working, but perl >> and python not. Will post here if I need more help, meanwhile, thanks
again.
Those turned out to be the shebangs. The site files are identical to
those when the sites runs under localhost on a Windows machine, and in general this works very well. CGI files are the one exception I've ever found:
In Windows, the shebang has to be of the form ...
#!python
#!perl
... which, as long as the relevant executables are on the path, works fine.
On 2024-12-07, Java Jive <java@evij.com.invalid> wrote:
On 2024-12-04 17:30, Java Jive wrote:
Now trying to restore cgi-bin functionality - php is working, but perl >>> and python not. Will post here if I need more help, meanwhile, thanks
again.
Those turned out to be the shebangs. The site files are identical to
those when the sites runs under localhost on a Windows machine, and in
general this works very well. CGI files are the one exception I've ever
found:
In Windows, the shebang has to be of the form ...
#!python
#!perl
... which, as long as the relevant executables are on the path, works fine.
How is this a windows thing? I thought they did that sort of stuff using file extensions (and the registry) instead! This is a serious bug,
stuff in /var/www should be os agnostic.
How is this a windows thing?
Sysop: | Luis Silva |
---|---|
Location: | Lisbon |
Users: | 763 |
Nodes: | 10 (0 / 10) |
Uptime: | 180:17:51 |
Calls: | 111 |
Files: | 46,971 |
Messages: | 11,239 |