1.Alfresco: redirect to HTTP port 80
https://capens.net/content/alfresco-redirect-http-port-80
By
default, Alfresco or any other Tomcat application will run on HTTP port
8080. Because of this, users would need to go to, for example, http://alfresco:8080/share to reach the Alfresco Share website.
We can make this easier by configuring Apache proxy_ajp which will redirect port 80 to Tomcat and will make the "/share" path optional.
Install Apache and enable the necessary modules:
Alfresco will still create links which point to port 8080 though (for example in e-mail notifications), so you should edit /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties and set:
Finally, you should edit /opt/alfresco-4.2.b/tomcat/conf/server.xml and enable UTF-8 encoding on the AJP connector as following:
2. Register your internal ip address with no.ip.com
Mapping "ranotech.ddns.net" to your dynamic ip address from the provider say "134.xxx.xxx.xxx"
alfresco-reverse-proxy.conf
ServerName alfresco
ErrorLog "/var/log/apache2/alfresco-error.log"
CustomLog "/var/log/apache2/alfresco-access.log" common
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/alfresco*
RewriteCond %{REQUEST_URI} !^/share*
RewriteRule /(.*)$ /share$0 [R]
ProxyPass /alfresco ajp://localhost:8009/alfresco
ProxyPassReverse /alfresco ajp://localhost:8009/alfresco
ProxyPass /share ajp://localhost:8009/share
ProxyPassReverse /share ajp://localhost:8009/share
We can make this easier by configuring Apache proxy_ajp which will redirect port 80 to Tomcat and will make the "/share" path optional.
Install Apache and enable the necessary modules:
apt-get install apache2
a2enmod proxy_ajp rewrite
Create a virtualhost configuration file at /etc/apache2/sites-available/alfresco-reverse-proxy with the following content: *:80>
ServerName alfresco
ErrorLog "/var/log/apache2/alfresco-error.log"
CustomLog "/var/log/apache2/alfresco-access.log" common
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/alfresco*
RewriteCond %{REQUEST_URI} !^/share*
RewriteRule /(.*)$ /share$0 [R]
ProxyPass /alfresco ajp://localhost:8009/alfresco
ProxyPassReverse /alfresco ajp://localhost:8009/alfresco
ProxyPass /share ajp://localhost:8009/share
ProxyPassReverse /share ajp://localhost:8009/share
Disable the default website (if necessary), enable the proxy and restart Apache:a2dissite 000-default
a2ensite alfresco-reverse-proxy
/etc/init.d/apache2 restart
That's it! Users can now simply type "alfresco" in their browser's address bar and will automatically be redirected to Alfresco Share.Alfresco will still create links which point to port 8080 though (for example in e-mail notifications), so you should edit /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties and set:
alfresco.port=80
share.port=80
Note that administrators can still manage Tomcat using http://alfresco:8080Finally, you should edit /opt/alfresco-4.2.b/tomcat/conf/server.xml and enable UTF-8 encoding on the AJP connector as following:
port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />
Without this, special characters (non-ascii characters such as é and â) will get mangled in the search forms.2. Register your internal ip address with no.ip.com
Mapping "ranotech.ddns.net" to your dynamic ip address from the provider say "134.xxx.xxx.xxx"
alfresco-reverse-proxy.conf
ServerName alfresco
ErrorLog "/var/log/apache2/alfresco-error.log"
CustomLog "/var/log/apache2/alfresco-access.log" common
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/alfresco*
RewriteCond %{REQUEST_URI} !^/share*
RewriteRule /(.*)$ /share$0 [R]
ProxyPass /alfresco ajp://localhost:8009/alfresco
ProxyPassReverse /alfresco ajp://localhost:8009/alfresco
ProxyPass /share ajp://localhost:8009/share
ProxyPassReverse /share ajp://localhost:8009/share
global-properties
###############################
## Common Alfresco Properties #
###############################
dir.root=/var/www/html/alfresco/alf_data
alfresco.context=alfresco
alfresco.host=ranotech.ddns.net
alfresco.port=80
alfresco.protocol=http
share.context=share
share.host=ranotech.ddns.net
share.port=80
share.protocol=http
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=1234
db.name=alfresco
db.url=jdbc:postgresql://localhost:5433/${db.name}
# Note: your database must also be able to accept at least this many connections. Please see your database documentation for instructions on how to configure this.
db.pool.max=275
db.pool.validate.query=SELECT 1
# The server mode. Set value here
# UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=UNKNOWN
### FTP Server Configuration ###
ftp.port=21
### RMI registry port for JMX ###
alfresco.rmi.services.port=50500
### External executable locations ###
ooo.exe=/var/www/html/alfresco/libreoffice/program/soffice
ooo.enabled=true
ooo.port=8100
img.root=/var/www/html/alfresco/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/var/www/html/alfresco/common/bin/pdf2swf
swf.languagedir=/var/www/html/alfresco/common/japanese
jodconverter.enabled=false
jodconverter.officeHome=/var/www/html/alfresco/libreoffice
jodconverter.portNumbers=8100
### Initial admin password ###
alfresco_user_store.adminpassword=7ce21f17c0aee7fb9ceba532d0546ad6
### E-mail site invitation setting ###
notification.email.siteinvite=true
# Sample Gmail settings
mail.host=smtp.gmail.com
mail.port=465
mail.username=somsakvrp@gmail.com
mail.password=2veeraphan
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true
### License location ###
dir.license.external=/var/www/html/alfresco
### Solr indexing ###
index.subsystem.name=solr4
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
### BPM Engine ###
system.workflow.engine.jbpm.enabled=false
### Allow extended ResultSet processing
security.anyDenyDenies=false
ไม่มีความคิดเห็น:
แสดงความคิดเห็น