我在桌面上运行ubuntu 13.04 64bit,我安装了Apache2,MySQL和PHP等.
我想让我的网络根目录/home/afflicto/public_html
而不是/var/www
.于是我就跟着去了本指南:
http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/2011/03/09
(我所做的一切,从"配置不同的网站"),因为我喜欢解决更多.
这就是我所做的:
安装Apache2,MySQL等..
复制/etc/apache2/sites-avaliable/default
到/etc/apache2/sites-available/afflicto
.然后编辑它,它现在看起来如下:
在/ etc/apache2的/网站可用/ afflicto
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/afflicto/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/afflicto/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel …
Run Code Online (Sandbox Code Playgroud) 我想将我的Node应用程序拆分成几个单独的文件,使其更加模块化,更易于维护.
但由于没有办法将文件直接"包含"到当前解析的文件中,就像PHP等其他语言一样,我的"模块"或"单独的文件"不会自动访问脚本中定义的"需要"的变量他们.
我怎样才能做到这一点?
我想在我的单独文件中做这样的事情:
module.exports = function(stuff) {
//I now have access to 'stuff'.
}
Run Code Online (Sandbox Code Playgroud)
但它有点麻烦.
我相信有人已经在我面前解决了这个问题......你有什么建议?
因此,我一直在使用作曲家来管理我的git repos(在bitbucket上),现在,忧郁的作曲家抱怨我无法访问我的repos:S
我没有做任何特别的事情。但是我继续使用生成了一个新密钥ssh-keygen
,复制了公共密钥并将其添加到我的bitbucket帐户中。
所以我sudo composer update
再次尝试,它仍然抱怨:
Failed to update git@bitbucket.org:afflicto/event.git, package information from this repository may be outdated (Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
)
Run Code Online (Sandbox Code Playgroud)
有什么事吗
我只是推送到我的git仓库之一,它工作正常。因此,似乎SSH密钥已正确设置,但Composer所做的事情很奇怪。
看来,composer update
以sudo
(ie sudo composer update
)身份运行将不会使用您的 ssh密钥……所以我必须将SSH密钥添加到我想的root用户中?:\
我通过git bash在我的服务器上通过ssh进入Nano.我什么都做不了.我可以上下滚动,但我不知怎的.
我该如何退出?我试图找到这个过程,但是窗户无法告诉我
git ×2
apache2 ×1
bash ×1
bitbucket ×1
composer-php ×1
javascript ×1
module ×1
node.js ×1
ssh ×1
ubuntu ×1
virtualhost ×1
windows ×1