Oh thanks :) I simplified this to making symbolic link: sudo ln -s /vagrant/ /var/www/my_project_name
Now, when I go to URL: 192.168.33.10/cgi-bin/main.py Firefox is serving me a "save file" dialog box. I guess i have something wrong in my shortlink.conf :] W dniu poniedziałek, 25 maja 2015 02:57:35 UTC+2 użytkownik Alvaro Miranda Aguilera napisał: > > Hello, > > Can be due permissions or ownership, or both > > what are the permissions and owner of /var/www > > ls -alR /var/www > > save the numbers for user and group > > id user should help > > you can do this > > sudo cp -r /var/www/ /vagrant/project > > then add: > > config.vm.synced_folder "project", "/vagrant/project", owner: > "<id_of_user>", group: "<gid_of_group>", mount_options: > ["dmode=775,fmode=664"] > > > Alvaro. > > On Mon, May 25, 2015 at 7:40 AM, Jarosław Janikowski > <[email protected] <javascript:>> wrote: > > Hello :) > > > > I'm learning on how to write CGI scripts, I've made my test server with > > vagrant and Apache, but unfortunately i have some problems with proper > > setup. > > > > My box > > ----------- > > - vagrant > > - debian 8 (32bit) > > - Apache2 (installed by sudo apt-get install apache2) > > > > > > My project directory on host machine > > ---------------------------------------------------- > > shortlink/ > > ├── cgi-bin > > │ └── main.py > > ├── install > > │ └── create_tables.sql > > ├── template > > │ └── index.html > > └── Vagrantfile > > > > My Vagrantfile > > -------------------- > > - has uncommented line: config.vm.network "private_network", ip: > > "192.168.33.10" > > - I can see apache's test HTML document after typing 192.168.33.10 in > hosts > > browser. > > > > My /etc/apache2/sites-available/shortlink.conf > > --------------------------------------------------------------------- > > <VirtualHost *:80> > > DocumentRoot /vagrant > > <Directory /vagrant/cgi-bin/> > > Options +ExecCGI > > AddHandler cgi-script .py > > Order Allow,Deny > > allow from all > > </Directory> > > </VirtualHost> > > > > - I have sumbolic link in sites-enabled > > > > And now I have problem, whenever I go to URL: > 192.168.33.10/cgi-bin/main.py > > i get error 304 Forbidden. > > > > How can I fix this? What I must do to see output of my script? > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Vagrant" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
