相关疑难解决方法(0)

如何在任何文件夹中轻松启动网络服务器?

我正在寻找一种相对轻松的方式来在我指定的任何文件夹(或者更好的是,我正在启动的位置)中启动具有文档根目录的 Web 服务器。

我经常在这里的某个新文件夹中尝试诸如 JS 框架之类的新东西:

/home/alexander/code/angularjs/
Run Code Online (Sandbox Code Playgroud)

然后进入这个目录并输入如下内容会很方便:

start-webserver-here 
Run Code Online (Sandbox Code Playgroud)

以便网络服务器开始侦听端口 80 并为该目录提供服务,我可以尝试我正在处理的任何内容。

我已经安装了 XAMPP,但它似乎是带有文档根目录的基本 apache,我必须更改,甚至具有根权限,以及为每个文件夹授予权限等。

有更容易的方法吗?

webserver

145
推荐指数
6
解决办法
11万
查看次数

apt-get update 命令在 xenial 本地镜像中不起作用

使用 apt-mirror,我将 xenial 包下载到我的机器上(IP 地址:172.16.3.37)。我的 apt-mirror 的“mirror.list”的内容如下。

############# config ##################
#
 set base_path    /ubuntuRepo
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############



deb-amd64 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse free non-free
deb-amd64 http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse free non-free
deb-amd64 http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe …
Run Code Online (Sandbox Code Playgroud)

apt localrepository software-installation 16.04

5
推荐指数
2
解决办法
9076
查看次数

Ubuntu 16.04 apt-get 更新失败,本地存储库

在我的 Ubuntu 服务器 16.04 上,我有以下条目 /etc/apt/sources.list

deb [arch=amd64 trusted=yes] file:/home/discoprodigy /debbin main  
Run Code Online (Sandbox Code Playgroud)

为了更好的衡量,我还尝试了受限制的宇宙和多元宇宙。此文件中没有其他条目。并且/etc/apt/sources.list.d是空的。

/home/discoprodigy/debbin

152 miscellaneous .deb files
Packages.gz
Packages (plain text file)
Run Code Online (Sandbox Code Playgroud)

只是为了好玩,我也有 /home/discoprodigy/debbin/main/binary-amd64

Packages.gz
Packages (plain text file)
Run Code Online (Sandbox Code Playgroud)

然后我执行:

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

这就是结果

Get:1 file:/home/discoprodigy /debbin InRelease
Ign:1 file:/home/discoprodigy /debbin InRelease
Get:2 file:/home/discoprodigy /debbin Release
Ign:2 file:/home/discoprodigy /debbin Release
Get:3 file:/home/discoprodigy /debbin/main amd64 Packages
Ign:3 file:/home/discoprodigy /debbin/main amd64 Packages
Get:4 file:/home/discoprodigy /debbin/main all Packages
Ign:4 file:/home/discoprodigy /debbin/main all Packages
  |
etc. etc.
  |
Get:3 file:/home/discoprodigy …
Run Code Online (Sandbox Code Playgroud)

updates package-management apt repository localrepository

5
推荐指数
1
解决办法
4663
查看次数