Hi,
I tried setting two vhost following this tutorial (http://lightyearsoftware.com/2012/01/gi ... s-control/) : one for port 80 and one on port 443
I left aside the htpasswd part as the command doesn't seem to exist on the asustor (something that would be nice to have).
It worked fine but as soon as I exit the vi editor for my vhosts they revert to the state in which the asustor system created them...
How do I make it so that the system keeps my custom configuration instead of overriding them as sson as I leave the editor ?
Thanks.
[HOWTO] Keep custom Virtual Hosts configs
-
- Posts: 59
- youtube meble na wymiar Warszawa
- Joined: Thu Apr 25, 2013 3:37 am
- James.W@AST
- Posts: 189
- Joined: Wed Jun 06, 2012 12:50 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi there,
I am sorry, but the system doesn't support using CLI to edit the vhost config directly. You need to use the ADM web interface (Services > Web Server > Virtual Host) to edit it.
JW
I am sorry, but the system doesn't support using CLI to edit the vhost config directly. You need to use the ADM web interface (Services > Web Server > Virtual Host) to edit it.
JW
To Infinity and Beyond!
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi,
I'm fine with using the ADM interface however I couldn't find anyplace to edit the virtual host in the manner I wanted.
BTW, what about the htpasswd command, any way to get it working on the nas system ?
Thanks.
I'm fine with using the ADM interface however I couldn't find anyplace to edit the virtual host in the manner I wanted.
BTW, what about the htpasswd command, any way to get it working on the nas system ?
Thanks.
- James.W@AST
- Posts: 189
- Joined: Wed Jun 06, 2012 12:50 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi there,
1. What kind of options you would like to configure for Virtual Host? We can provide it in the ADM interface.
2. Thanks for the suggestion. We will add htpasswd in the future firmware. If you would like to use it in advance, you can download the attachment, unzip and place it in /usr/builtin/bin/.
1. What kind of options you would like to configure for Virtual Host? We can provide it in the ADM interface.
2. Thanks for the suggestion. We will add htpasswd in the future firmware. If you would like to use it in advance, you can download the attachment, unzip and place it in /usr/builtin/bin/.
- Attachments
-
- htpasswd.zip
- (6.15 KiB) Downloaded 667 times
To Infinity and Beyond!
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi,
Thanks for the quick reply. Basically, I'm trying to set an https access to my git repo, at least until the ssh users options comes out
So I was foolowing a tutorial ( see link in previous post) to set up the virtual hosts and configure git to serve the repos through https as well:
# mod_authn_alias essentially configures groups of users.
<AuthnProviderAlias file internal>
AuthUserFile /etc/apache2/git-internal.htpasswd
</AuthnProviderAlias>
<AuthnProviderAlias file clients>
AuthUserFile /etc/apache2/git-clients.htpasswd
</AuthnProviderAlias>
<VirtualHost YOUR-SERVER-IP:443>
SSLEngine on
SSLCertificateFile PATH-TO-YOUR-CERTIFICATE-FILE
ServerName YOUR-SERVER-NAME
ErrorLog /var/log/apache2/git-error.log
CustomLog /var/log/apache2/git-access.log combined
DocumentRoot /home/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GIT_PROJECT_ROOT /home/git
# Let Apache serve static files
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /home/git/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /home/git/$1
ScriptAlias / /usr/lib/git-core/git-http-backend/
<Directory /home/git>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
# Require authentication to all repositories
<Location />
AuthBasicProvider internal
AuthType Basic
AuthName "Git"
Require valid-user
</Location>
# Allow both internal and client users to access this repository.
<Location /client-repo.git>
AuthBasicProvider internal clients
AuthType Basic
AuthName "Git"
Require valid-user
</Location>
</VirtualHost>
If all the options there could be available that would be awesome.
Regards.
Thanks for the quick reply. Basically, I'm trying to set an https access to my git repo, at least until the ssh users options comes out
So I was foolowing a tutorial ( see link in previous post) to set up the virtual hosts and configure git to serve the repos through https as well:
# mod_authn_alias essentially configures groups of users.
<AuthnProviderAlias file internal>
AuthUserFile /etc/apache2/git-internal.htpasswd
</AuthnProviderAlias>
<AuthnProviderAlias file clients>
AuthUserFile /etc/apache2/git-clients.htpasswd
</AuthnProviderAlias>
<VirtualHost YOUR-SERVER-IP:443>
SSLEngine on
SSLCertificateFile PATH-TO-YOUR-CERTIFICATE-FILE
ServerName YOUR-SERVER-NAME
ErrorLog /var/log/apache2/git-error.log
CustomLog /var/log/apache2/git-access.log combined
DocumentRoot /home/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GIT_PROJECT_ROOT /home/git
# Let Apache serve static files
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /home/git/$1
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /home/git/$1
ScriptAlias / /usr/lib/git-core/git-http-backend/
<Directory /home/git>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
# Require authentication to all repositories
<Location />
AuthBasicProvider internal
AuthType Basic
AuthName "Git"
Require valid-user
</Location>
# Allow both internal and client users to access this repository.
<Location /client-repo.git>
AuthBasicProvider internal clients
AuthType Basic
AuthName "Git"
Require valid-user
</Location>
</VirtualHost>
If all the options there could be available that would be awesome.
Regards.
- James.W@AST
- Posts: 189
- Joined: Wed Jun 06, 2012 12:50 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi blackstar,
Thanks. We will see what we can do : )
Thanks. We will see what we can do : )
To Infinity and Beyond!
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi,
Thanks.
Also I had another question, is the apache server run with the usual user/group ( www-data:www-data) ? Or is there any specifities there also ?
Thanks.
Also I had another question, is the apache server run with the usual user/group ( www-data:www-data) ? Or is there any specifities there also ?
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi,
Coming back on this topic after a while because I did not have time to look for another way to serve git over http from the NAS but here's something I found (http://www.jedi.be/blog/2009/05/06/8-wa ... apachehttp)
It uses "DAV on" directive and htpasswd files to serve git over apache httpd with baic htpasswd authentication.
Would this work on the asustor ? Is there any thing special to do to get it working ?
Cheers.
Coming back on this topic after a while because I did not have time to look for another way to serve git over http from the NAS but here's something I found (http://www.jedi.be/blog/2009/05/06/8-wa ... apachehttp)
It uses "DAV on" directive and htpasswd files to serve git over apache httpd with baic htpasswd authentication.
Would this work on the asustor ? Is there any thing special to do to get it working ?
Cheers.
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hi,
Could I get an answer please ?
Cheers
Could I get an answer please ?
Cheers
-
- Posts: 59
- Joined: Thu Apr 25, 2013 3:37 am
Re: [HOWTO] Keep custom Virtual Hosts configs
Hello.
Can we get a feedback on that topic. any plans on implementing this or not ? If so , when can we expect it ?
Can we get a feedback on that topic. any plans on implementing this or not ? If so , when can we expect it ?