0

I need to run a apache server locally in order to use the program labelme. However I'm not able to do it.

There is a description saying that I need to place my folder containing "index.html" inside /var/www/html.

However I need to run the website located in the local folder ~/libs/labelme.

I also followed this instruction from similar askubuntu-question. But it doesn't work for me. The browser just displays nothing when I try to reach that project-page.

I'm a novice in apache, so I don't even know if the problem lies with the way I configured apache or if the problem comes from labelme.

Any help would be appreciated

mcExchange
  • 2,928
  • 9
  • 23
  • 33
  • move **~/libs/labelme** to **/home/labelme** and try http://askubuntu.com/questions/389399/setup-localhost-site-in-apache 1 st answer – koolwithk Feb 23 '16 at 19:58

2 Answers2

1

Found some better documented version of the labelme code with better documentation. These is the full list of options that one needs to make the apache server run correctly (modify /etc/apache2/apache2.conf)

   <Directory "/var/www/LabelMeAnnotationTool">
       Options Indexes FollowSymLinks MultiViews Includes ExecCGI
       AddHandler cgi-script .cgi
       AllowOverride all
       Require all granted
       AddType text/html .shtml
       AddOutputFilter INCLUDES .shtml
       DirectoryIndex index.shtml
    </Directory>
mcExchange
  • 2,928
  • 9
  • 23
  • 33
0
cd /etc/apache2/sites-available/

nano 000-default.conf

search for DocumentRoot /var/www/html (ctrl+w type /var/www/html)

replace /var/www/html with /home/labelme move lableme to /home/ directory

save the file 000-default.conf (ctrl+x and the y > enter)

edit /etc/apache2/apache2.conf file

add below lines after:

<Directory /home/labelme/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

restart apache2 web server:

service apache2 restart

And enter below URL into your browser

http://127.0.0.1/ or http://localhost/

OR

koolwithk
  • 201
  • 1
  • 8
  • Strangely I get an `Forbidden - You don't have permission to access / on this server - Apache/2.4.7 (Ubuntu) Server at localhost Port 80` Error now. – mcExchange Feb 24 '16 at 09:10
  • I just looked again into the `README` of `labelme` and it says: `* Enable authconfig in Apache so that server side includes (SSI) will work. This will allow SVG drawing capabilities.` and also `* Allow perl/CGI scripts to run.` Maybe thats why it is forbidden. However I don't know how to activate them. In case that's really the problem I might also update my question – mcExchange Feb 24 '16 at 09:13
  • updated answer. edit /etc/apache2/apache2.conf file. – koolwithk Feb 24 '16 at 09:38
  • Actually there were a ton of more options needed to make it run as I found out in some newer version of the code. I will add it as a separate answer. Still thanks for your help – mcExchange Feb 25 '16 at 14:45