I tested before uploading.

Does it run for you without any change?



On Mon, Jan 18, 2016 at 12:01 AM, Edgar Oliveira <[email protected]
> wrote:

> Hello Alvaro,
>
> Thanks for your help,
>
> I downloaded the archives but I had to do some changes. I change the file
> "Vagrantfile" to:
>
> Vagrant.configure(2) do |config|
>   config.vm.box = "hashicorp/precise32"
>   config.vm.network "forwarded_port", guest: 80, host: 8080
>   config.vm.network "private_network", ip: "192.168.33.48"
>   config.vm.provision "shell", path: "provision.sh", privileged: false
>   config.vm.synced_folder "cgi-bin", "/usr/lib/cgi-bin",
> id: "cgi-bin", :mount_options => ["uid=33,gid=33"]
>   config.vm.synced_folder "www", "/var/www/",
> id: "www", :mount_options => ["uid=33,gid=33"]
> end
>
> And when tried access "http://192.168.33.48/cgi-bin/poweroff.sh"; I
> received this error "500 Internal Server Error:
>
> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server administrator, webmaster@localhost and inform
> them of the time the error occurred, and anything you might have done that
> may have caused the error.
>
> More information about this error may be available in the server error log.
> ------------------------------
> Apache/2.2.22 (Ubuntu) Server at 192.168.33.48 Port 80"
> I looked the file error, on /var/log/apache2/error.log" and see this lines:
> [Sun Jan 17 10:54:05 2016] [error] (13)Permission denied: exec of
> '/usr/lib/cgi-bin/poweroff.sh' failed[Sun Jan 17 10:54:05 2016] [error]
> [client 192.168.33.1] Premature end of script headers: poweroff.sh
> What I got understood which the script, poweroff.sh, has a error or I
> couldn't permissions to run it.Thanks
> domingo, 17 de Janeiro de 2016 às 03:55:02 UTC, Alvaro Miranda Aguilera
> escreveu:
>>
>> Hello Edgard
>>
>> Seems I sent an incomplete message.
>>
>> I did this project for you:
>> https://github.com/kikitux/precise64-cgi-bin
>>
>> check the provision.sh and the cgi-bin folder
>>
>> you can visit: http://localhost:8080/cgi-bin/poweroff.sh
>>
>> And that will poweroff the machine.
>>
>> Let me know if that is what you are after.
>>
>> If you got questions, just le me know, happy to help.
>>
>> Alvaro.
>>
>> On Sun, Jan 17, 2016 at 4:22 PM, Alvaro Miranda Aguilera <
>> [email protected]> wrote:
>>
>>> Hello Edgard.
>>>
>>> You need to find out where the cgi-bin directory is.
>>>
>>> Seems on ubuntu is here:
>>>
>>> /usr/lib/cgi-bin/
>>>
>>>
>>> (is on the webpage tutorial)
>>>
>>>
>>> On 17/01/2016, at 1:37 PM, Edgar Oliveira <[email protected]> wrote:
>>>
>>> Hello Alvaro,
>>>
>>> I am always learn with you :)
>>>
>>> Thank you for your advice.
>>> I am studying this examples "
>>> http://www.yolinux.com/TUTORIALS/BashShellCgi.html";. Because the
>>> article which share with me yet are advanced for me.
>>>
>>> Not yet I explored the site but If you can help me, I will appreciate.
>>> When I create folder with name "cgi-bin" I received the error 403
>>> Forbidden. How can I fix that? This erros only happen when I create the
>>> folder with this name.
>>>
>>> Thanks
>>>
>>> quarta-feira, 13 de Janeiro de 2016 às 13:52:41 UTC, Edgar Oliveira
>>> escreveu:
>>>>
>>>> Hello,
>>>>
>>>> Any idea to create an file for when I accessed through browser it
>>>> execute the code to shutdown my virtual machine?
>>>> E.G. I accessed the IP 192.168.1.50, corresponding the VM, and when
>>>> access the file something.php and inside this file execute the code which
>>>> the same execute via terminal "sudo shutdown -h 1".
>>>>
>>>> Which language do you advice to build this option? The vagrant was any
>>>> option for this?
>>>>
>>>> Thanks
>>>>
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/vagrant/issues
>>> IRC: #vagrant on Freenode
>>> ---
>>> 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].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/vagrant-up/bdd48c8e-1a12-4e77-90d0-c4e36b75fe1d%40googlegroups.com
>>> <https://groups.google.com/d/msgid/vagrant-up/bdd48c8e-1a12-4e77-90d0-c4e36b75fe1d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/df432a06-288b-4e72-b864-8d6824b83d84%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/df432a06-288b-4e72-b864-8d6824b83d84%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ex-P%2BLtgFVMFvyUYUNOJj1vm3rr%2BGD3L9As1dY2pfaeTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to