Monthly Archives: July 2016

w3c xml 생성 변경 코드

작업중 필요없어져서 삭제하려다가 저장

Xml 이용해서 정보 저장하는코드.  오브젝트 네임을 바꿨는데 이 과정에서 오류가 약간 있을수도..

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;


public class SchoolDao {

	private final Document document;
	private final Node root;
	private final File file;

	public SchoolDao() throws ParserConfigurationException, FileNotFoundException, SAXException, IOException {
		this("conf", "server.xml");
	}
	public SchoolDao(String filePath, String fileName) throws ParserConfigurationException, FileNotFoundException, SAXException, IOException {
		file = new File(filePath, fileName);
		if (file.exists() && file.isFile()) {
			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new FileInputStream(file));
			root = document.getFirstChild();
		} else {
			document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
			root = document.createElement("root");
			document.appendChild(root);
			new File(filePath).mkdirs();
			file.createNewFile();
		}
	}

	public void addSchool(SchoolObject so) {
		Node school = document.createElement("server");

		addNode(school, "name", so.getName());
		addNode(school, "score", so.getScore());
		
		root.appendChild(school);
	}
	
	private void addNode(Node parent, String nodeName, String nodeContent){
		Node tmpNode;
//		Attr tmpAttr;
		tmpNode = document.createElement(nodeName);
		tmpNode.setTextContent(nodeContent);
//		((Element)tmpNode).setAttributeNode(tmpAttr);
		parent.appendChild(tmpNode);
	}

	public void write() throws TransformerException {
		TransformerFactory transformerFactory = TransformerFactory.newInstance();
		Transformer transformer = transformerFactory.newTransformer();
		DOMSource source = new DOMSource(document);
		StreamResult result = new StreamResult(file);
		transformer.transform(source, result);
		// Output to console for testing
		StreamResult consoleResult = new StreamResult(System.out);
		transformer.transform(source, consoleResult);
	}

	public static void main(String[] args) throws FileNotFoundException, ParserConfigurationException, SAXException,
			IOException, TransformerException {
		SchoolDao dao = new SchoolDao();
		SchoolObject so = new SchoolObject("schoolname");
		so.setScore(100);
		dao.addHost(so);
		dao.write();
	}
}

 

Ubuntu – Crontab – Exec format error

우분투 로그인하니까 you’ve got mail..
또 무슨 오류가?

cat /var/mail/root

........
........
..........
run-parts: failed to exec /etc/cron.hourly/readweb: Exec format error
run-parts: /etc/cron.hourly/readweb exited with return code 1

써있는대로… 실행이 안되서 오류가 났다고 하는건데

readweb 스크립트는 curl을 이용해서 특정 웹페이지를 저장하는 역할을 한다

검색을 해 보니

 

http://askubuntu.com/questions/264607/bash-script-not-executing-from-crontab

원인은 cron에는 path를 잡아주지 않기 때문에 실행명령어를 full path로 적어주거나 path를 따로 잡아줘야함

해결책 :

/usr/bin/curl 처럼 full path로 쓰거나

PATH=/usr/bin

를 잡아줘야하는데…

 

그냥 명령어를 full path로 명시하는게 낫지 않을까

 

BCrypt 암호화 방식

비밀번호 저장에 특화된 암호화로 매 실행시마다 값이 변경된다.

글자수 제한이 있는것이 특징

자세한건 검색으로

테스트코드 첨부

	public static void main(String[] args){
		BCryptPasswordEncoder encoder1 = new BCryptPasswordEncoder();
		String seed1 = "012345678901234567890123456789";
		String result1 = encoder1.encode(seed1);
		System.out.println(result1);
		String seed2 = "01234567890123456789012345678901234567890123456789012345678901234567890";
		String result2 = encoder1.encode(seed2);
		System.out.println(result2);
		String seed3 = "012345678901234567890123456789012345678901234567890123456789012345678901";//최대글자수
		String result3 = encoder1.encode(seed3);
		String seed4 = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789";
		System.out.println(result3);
		System.out.println();
		System.out.println(encoder1.matches(result1, seed1));
		System.out.println(encoder1.matches(seed1, result1));
		System.out.println(encoder1.matches(seed2, result2));
		System.out.println(encoder1.matches(seed3, result3));
		System.out.println(encoder1.matches(seed4, result3));
}

 

Spring multipart upload 에러

해결 :

@Bean
public CommonsMultipartResolver commonsMultipartResolver() {

>>>>>>>>>>

@Bean
public CommonsMultipartResolver multipartResolver() {

bean 이름을 바꿨다.

spring에서 bean name을 가지고 매핑하니 이름을 정확히 써야한다.

 

오류내용 :

HandlerMethod details: 
Controller [net.polypia.image.controller.ImageController]
Method [public java.lang.Object net.polypia.image.controller.ImageController.uploadServer(org.springframework.web.multipart.MultipartHttpServletRequest,java.lang.String,java.lang.Long)]

java.lang.IllegalStateException: Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]: org.apache.catalina.connector.RequestFacade@758a3e87
	at org.springframework.web.servlet.mvc.method.annotation.ServletRequestMethodArgumentResolver.resolveArgument(ServletRequestMethodArgumentResolver.java:94) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:78) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:129) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) [servlet-api.jar:na]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.36]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.36]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.36]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.36]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [catalina.jar:8.0.36]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) [tomcat-coyote.jar:8.0.36]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) [tomcat-coyote.jar:8.0.36]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote.jar:8.0.36]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote.jar:8.0.36]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.36]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
15:00:16.847 DEBUG [http-nio-8081-exec-5] o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver.resolveException : Resolving exception from handler [public java.lang.Object net.polypia.image.controller.ImageController.uploadServer(org.springframework.web.multipart.MultipartHttpServletRequest,java.lang.String,java.lang.Long)]: java.lang.IllegalStateException: Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]: org.apache.catalina.connector.RequestFacade@758a3e87
15:00:16.849 DEBUG [http-nio-8081-exec-5] o.s.w.s.m.a.ResponseStatusExceptionResolver.resolveException : Resolving exception from handler [public java.lang.Object net.polypia.image.ImageController.uploadServer(org.springframework.web.multipart.MultipartHttpServletRequest,java.lang.String,java.lang.Long)]: java.lang.IllegalStateException: Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]: org.apache.catalina.connector.RequestFacade@758a3e87
15:00:16.849 DEBUG [http-nio-8081-exec-5] o.s.w.s.m.s.DefaultHandlerExceptionResolver.resolveException : Resolving exception from handler [public java.lang.Object net.polypia.image.ImageController.uploadServer(org.springframework.web.multipart.MultipartHttpServletRequest,java.lang.String,java.lang.Long)]: java.lang.IllegalStateException: Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]: org.apache.catalina.connector.RequestFacade@758a3e87
15:00:16.850 DEBUG [http-nio-8081-exec-5] o.s.web.servlet.DispatcherServlet.processRequest : Could not complete request

java.lang.IllegalStateException: Current request is not of type [org.springframework.web.multipart.MultipartHttpServletRequest]: org.apache.catalina.connector.RequestFacade@758a3e87
	at org.springframework.web.servlet.mvc.method.annotation.ServletRequestMethodArgumentResolver.resolveArgument(ServletRequestMethodArgumentResolver.java:94) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:78) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:129) ~[spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) [servlet-api.jar:na]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.36]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.36]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.36]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.36]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.36]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.36]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [catalina.jar:8.0.36]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) [tomcat-coyote.jar:8.0.36]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) [tomcat-coyote.jar:8.0.36]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote.jar:8.0.36]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote.jar:8.0.36]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.36]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]

 

 

Ubuntu 16.04 Redmine 3.3 설치

sudo apt  16에서는 apt가 새로 추가됐다.apt-get은 레거시 지원은 되는것같은데 새로운게 더 좋아보이니 이걸로

 

먼저 기본적인 부분을 설치한다

(http://memo.polypia.net/archives/573)

 

DB mysql

sudo apt install mysql-common mysql-server mysql-client

라이브러리 libmysqlclient-dev  (예전인 mysql-client-dev 였던것같은데)

 

 

ruby 관련 설치

예전엔 전역설치가 됐는데 요즘은 보안상이유로 이를 권장하지 않고 지원도 잘 안해주니 루비를 실행시킬 사용자를 생성한다

sudo adduser redmine

sudo su – redmine

rvm.io 가서보면 설치방법이 간단하게 나온다.

Install RVM:
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable

위 실행이 끝나고 나면  source ~~경로 처리해주라고 나온다.

path를 다시 잡아주는 과정인데

잘 찾아보면 있는데 모르겠으면 재부팅

 

rvm version

안해도되지만 현재 rvm버전이 뭔지 확인 해 보고 .. 잘 설치됐나 확인하는 절차이기도 하니

특정 루비 버전을 지정해주기도 하는데 그냥 설치하는게 편하니

rvm install ruby

버전을 지정할 때는 ‘rvm install 2.x.x’ 처럼 입력하면 된다.

버전을 여러개 설치할 경우에는 ‘rvm use 1.9.3 –default’ 명령으로 버전을 변경 가능하다.

 

gem install rails

gem install bundler

 

이제 레드마인 다운로드

www.redmine.org

 

다운로드 해도 되지만 svn으로 받으면 편하니까

$ cd ~
$ svn co https://svn.redmine.org/redmine/branches/3.3-stable redmine-3.3
$ cd redmine-3.3

 

설치가이드 페이지

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

 

1 mysql 데이터베이스와 사용자 생성

CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

For versions of MySQL prior to 5.0.2 – skip the ‘create user’ step and instead:

GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'my_password';

2 config/database.yml 설정

production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: my_password

3 실행

rails의 의존성 설치

bundle install

하다가 보통 mysql2와 rmagick에서 오류가 나는데

mysql2는 위에서libmysqlclient-dev를 설치해서 안날거고

rmagick은 다음줄을 설치하면 된다

sudo apt-get install imagemagick libmagickwand-dev

 

 

설치명령(하다가 뻑난경우 mysql 데이터베이스 삭제후다시 만들면 편하다)

디비스키마 생성

RAILS_ENV=production bundle exec rake db:migrate

기본데이터 생성

RAILS_ENV=production bundle exec rake redmine:load_default_data

디렉토리 권한설정

$ mkdir -p tmp tmp/pdf public/plugin_assets
$ chown -R redmine:redmine files log tmp public/plugin_assets
$ chmod -R 755 files log tmp public/plugin_assets

 

실행테스트

bundle exec rails server webrick -e production

서버주소:3000 로 접속확인

 

 

apache passenger 연동

$ gem install passenger
$ passenger-install-apache2-module

그냥 실행하면 설명이 나옴

(http://memo.polypia.net/archives/586)

 

 

virtualhost.conf

<VirtualHost *:80>
        ServerName pms.msync.co.kr
        DocumentRoot /site/redminepath/redmine-3.3/public

        <Directory /site/redminepath/redmine-3.3/public>
                Options Indexes FollowSymLinks
                AllowOverride all
                Require all granted
        </Directory>
</VirtualHost>