Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am configuring LG looking glass on Ubuntu. I have followed this link. In step 3 they said to add following two lines to webserver config:

Alias /lg/favicon.ico /usr/local/httpd/htdocs/lg/favicon.ico
ScriptAlias /lg /usr/local/httpd/htdocs/lg/lg.cgi

I have added it to my webserver config:

#vi /etc/apache2/sites-available/default

Alias /lg/favicon.ico "/usr/local/httpd/htdocs/lg/favicon.ico"
    <Directory "/usr/local/httpd/htdocs/lg/favicon.ico">
        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>

ScriptAlias /lg/  "/usr/local/httpd/htdocs/lg/lg.cgi"
        <Directory "/usr/local/httpd/htdocs/lg/lg.cgi">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from 127.0.0.0/255.0.0.0 ::1/128

        </Directory>

When I tried http://127.0.0.1/lg in my browser, it shows not found.

I am new with web-server, can anyone help me please?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

As far as I can see, you have only added aliases for /lg/favicon.ico and /lg/lg.cgi, and not the lg directory itself. Try pointing you browser to one of these files, or changing your configuration so that it applies to the entire lg directory.

Also, you should type sudo apache2 restart to make the new changes come into effect.

Update: I think this is the config file you should be using:

#vi /etc/apache2/sites-available/default

Alias /lg/favicon.ico "/usr/local/httpd/htdocs/lg/favicon.ico"
    <Directory "/usr/local/httpd/htdocs/lg/favicon.ico">
        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>

ScriptAlias /lg/  "/usr/local/httpd/htdocs/lg/"
        <Directory "/usr/local/httpd/htdocs/lg/">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                AddHandler cgi-script .cgi
                Order allow,deny
                Allow from 127.0.0.0/255.0.0.0 ::1/128

        </Directory>

Notice that /lg/, which is a directory, points to /usr/local/httpd/htdocs/lg/, which is also a directory. The same thing applies to the Directory directive.

Then point your browser to http://<host>/lg/lg.cgi. Does this work?

share|improve this answer
    
I have edited my question. It will be ScriptAlias /lg/ "/usr/local/httpd/htdocs/lg/lg.cgi", it's my mistake. –  Jesi Oct 4 '12 at 9:33
    
Wouldn't that redirect a directory to a file? I think ScriptAlias /lg/ "/usr/local/httpd/htdocs/lg/" would work better. –  Kalle Elmér Oct 4 '12 at 9:37
    
If I point my browser to /lg/favicon.ico, it shows the icon. But my main job is pointing to lg. –  Jesi Oct 4 '12 at 9:39
    
Do you want a directory listing when pointing your browser to /lg/? –  Kalle Elmér Oct 4 '12 at 9:40
    
my ultimate goal is to get a page like this, from where I can ping, trace etc. –  Jesi Oct 4 '12 at 9:43
show 7 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.