Skip to main content

Global Script

Comments

5 comments

  • quietFinn
    I think you should add that in Pre VirtualHost Include
    0
  • cPRex Jurassic Moderator
    That code actually won't work. According to the Apache docs:
    0
  • quietFinn
    I was testing this a bit and it worked, although I used a .shtml file In pre_virtualhost_global.conf I put: ScriptAlias /whereami /var/www/html/netfinn/whereami.shtml (whereami.shtml was just printing something) EDIT: I made a php script to output hostname & IP address and it works. ScriptAlias /whereami /var/www/html/netfinn/whereami.php
    0
  • cPRex Jurassic Moderator
    Interesting - I really didn't think that would work based on the Apache docs, but I'm glad you found a solution!
    0
  • sozotech
    I was testing this a bit and it worked, although I used a .shtml file In pre_virtualhost_global.conf I put: ScriptAlias /whereami /var/www/html/netfinn/whereami.shtml (whereami.shtml was just printing something) EDIT: I made a php script to output hostname & IP address and it works. ScriptAlias /whereami /var/www/html/netfinn/whereami.php

    That is great that you got it working. I tried putting it in pre_virtualhost_global.conf but I am getting an error still. lscgid: execve():/var/www/html/whereami.php: Exec format error Perhaps this is because I am using Litespeed instead of Apache? Thanks!
    0

Please sign in to leave a comment.