Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict Acess to /edit spreedsheet. #166

Closed
ThiagoEmanoel92 opened this issue Feb 21, 2015 · 5 comments
Closed

Restrict Acess to /edit spreedsheet. #166

ThiagoEmanoel92 opened this issue Feb 21, 2015 · 5 comments
Labels

Comments

@ThiagoEmanoel92
Copy link

Hi , Andrey how are u ?

I 'm from Brazil , and i must say there so many Guys from I.T are using EtherCalc , and this is Amazing .
I am trying use EtherCalc , but i 'am having a problem .

i want make that , when someone try access my spreedsheet , he must insert User and Password , like Issue #4 .

I wanna make this at my Apache , is possible ?

My virtual host is like this :

<VirtualHost *:80>  
    ServerName localhost
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
<Directory /var/www/phpmyadmin>
Order allow,deny
allow from all
</Directory>
<Directory /var/www/phpipam>
Options FollowSymLinks
AllowOverride all
Require all granted
</Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I am running EtherCalc from port 8000 , and my Apache run at port 80.

Thanks for your attention.

@audreyt
Copy link
Owner

audreyt commented Feb 21, 2015

I've not worked with Apache for the past 10 years, though https://httpd.apache.org/docs/2.4/howto/auth.html#gettingitworking and https://httpd.apache.org/docs/current/mod/mod_proxy.html describes a general process of password-protecting a given URL, such as /edit.

Please post here when you (or another helpful folk) have a recipe ; I'd be happy to add the worked example into the ethercalc repository.

@ThiagoEmanoel92
Copy link
Author

Hey Audrey , thanks for the fast reply .

Guy i was reading the documentation from Apache.org , and now is Working very amazing .

Thank you for this Great Application man , i'ill try put .htpasswd at URL "/view" , can i make like "/edit"

Ciao .

@pjrobertson
Copy link
Contributor

Incase it helps, here's part of my Apache conf file (in /etc/apache2/sites-enabled/)

To view any spreadsheets, you need to be logged in as any user. To edit spreadsheets you have to be logged in as asdanadmin

        ProxyPass /sheets/ http://127.0.0.1:8000/
        ProxyPassReverse /sheets/ http://127.0.0.1:8000/
        <LocationMatch "^/sheets/">
                AuthType Basic
                AuthName "Viewer"
                AuthUserFile "/etc/apache2/htpasswd"
                Require valid-user
                Order allow,deny
                Allow from all
        </LocationMatch>

        <LocationMatch ^/sheets/(.*)/edit$>
                AuthType Basic
                AuthName "Viewer"
                AuthUserFile "/etc/apache2/htpasswd"
                Require user asdanadmin
                Order allow,deny
                Allow from all
        </LocationMatch>

I think you can probably close this issue :-)

@audreyt
Copy link
Owner

audreyt commented Apr 30, 2015

Yup. Thanks! 🌈

@audreyt audreyt closed this as completed Apr 30, 2015
@pjrobertson
Copy link
Contributor

谢谢 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants