I'm trying to get the Apache server to run locally and have installed
% node -v
v19.4.0
% npm -v
9.2.0
with
% http-server webpage1.html
Starting up http-server, serving webpage1.html
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://127.0.0.1:8080
http://192.168.93.35:8080
Hit CTRL-C to stop the server
I have created the file Webpage1.html in a directory called test inside the home directory.
I went to http://127.0.0.1:8080 in the address bar of the browser Mozilla and using Ventura 13.1 on a macbook pro. The error I'm getting is
This 192.168.93.35 page can’t be found
No web page was found for the web address: http://192.168.93.35:8080/
HTTP ERROR 404
Why is the browser not render the html?
Thanks,
Related
I have a Vue JS application built in the directory dist. For running I use http-server installed globally by the command:
npm install -g http-server
I run the app with the command:
http-server dist
So I can reach the website on http://localhost:8080, it works correct. But in my app I have vue-router that is configured with history mode, so I should access the URLs like http://localhost:8080/page1, but the problem is http-server returns 404:
curl -i http://localhost:8080/page1
HTTP/1.1 404 Not Found
accept-ranges: bytes
Date: Sat, 11 Sep 2021 12:41:53 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 0
How do I fix it?
I believe that the fix is to run http-server with the "proxy" option as a "Catch-All" redirect - http-server -P http://localhost:8080? dist
I am complete beginner so I apologize in advance.
I have installed npm with these scripts in terminal
1.curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
2.nvm install node
then I set it to run like this
http-server -a localhost
Starting up http-server, serving ./public
Available on:
http://localhost:8081
an I have an index. html in my documents that I would like to display. I have tried to just state the whole path in the browser so like http://localhost:8081/Documents/testServer/index.html
But that doesn't work
You must install the tools inside the folder that contains index.html file as below
First : Open the folder that contain index.html
Second : Install Tools
1.curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
2.nvm install node
Third : Open the live server at :
http://localhost:8081/Documents/testServer/index.html
We use bitbucket pipeline for our angular 5 to deploy our code to GAE. We are ending up with the following exception. We use bitbucket pipelines the the CI/CD
THis is the pipeline code
image: node:9.11.1
pipelines:
custom:
default:
- step:
script:
- npm install -g #angular/cli#latest
- ng build --prod
- cp app.yaml dist
- ls dist
- cd dist
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-190.0.0-linux-x86_64.tar.gz
- tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
- echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
- gcloud config set project $GCLOUD_PROJECT
- gcloud components install app-engine-java
- gcloud auth activate-service-account --key-file gcloud-api-key.json
- echo $GCLOUD_API_KEYFILE > /tmp/client-secret.json
- gcloud config set project $GCLOUD_PROJECT
- gcloud app update --split-health-checks --project adtecy-ui
- gcloud app deploy app.yaml
I am looking to use node docker image to deploy angular 5 (version 5.2.11) app to GAE flex environment but it takes an unusally long time and the status is still "In Progress" (not sure the usual deploy time)
This is my app.yaml file
env: flex
runtime: python
threadsafe: true
readiness_check:
timeout_sec: 4
check_interval_sec: 5
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 3600
I have given a very high timeout period because the previous push failed with a timeout
I believe GAE by default use python and hence we did not install python
Right now the deployment is running for about 20 mins or so but without letting us know any result. Could you guys help in deploying my app to GAE with minimal time?
EDIT:
Now we have got the result after running for 33 minutes
`21df82f90a72: Layer already exists
aeb4b6656589: Pushed
latest: digest:
sha256:c57d3178321c5f2721fc70cd00cb7862d469c74a6bf616ecfda760342c13af7e size: 3255
DONE
--------------------------------------------------------------------------------
Updating service [default] (this may take several minutes)...
.failed.
ERROR: (gcloud.app.deploy) Operation [apps/adtecy-
ui/operations/9c273f87-91a3-495a-b75d-0d6c767dce97] timed out.
This operation may still be underway.`
You can check the status of the deploy operation by running
gcloud app operations "apps/adtecy-ui/operations/9c273f87-91a3-495a-b75d-0d6c767dce97"
there seems to be an issue with running the app is nodejs environment. So I switched to python27 and I was able to successfully deploy it. But when I try to load using the app served in GAE it is throwing an error.
https://adtecy-ui.appspot.com
And here is my app.yaml (And I made some modifications too)
runtime: python27
api_version: 1
threadsafe: true
handlers:
# Routing for bundles to serve directly
- url: /((?:inline|main|polyfills|styles|vendor)\.[a-z0-9]+\.bundle\.js)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Routing for a prod styles.bundle.css to serve directly
- url: /(styles\.[a-z0-9]+\.bundle\.css)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Routing for typedoc, assets and favicon.ico to serve directly
- url: /((?:assets|docs)/.*|favicon\.ico)
secure: always
redirect_http_response_code: 301
static_files: dist/\1
upload: dist/.*
# Any other requests are routed to index.html for angular to
handle so we don't need hash URLs
- url: /.*
secure: always
redirect_http_response_code: 301
static_files: dist/index.html
upload: dist/index\.html
I use brew to install polipo through Mac OS terminal. It seems successfully install, but I can not find the config file and edit it.Can anyone help me figure out the reason?
The config file will not be created automatically. You need to get sample config file. Run this command in Terminal:
curl -o ~/.polipo https://raw.githubusercontent.com/jech/polipo/master/config.sample
and for forbidden URLs:
curl -o ~/.polipo-forbidden https://raw.githubusercontent.com/jech/polipo/master/forbidden.sample
Then restart polipo to ensure that it will use the config file:
launchctl unload /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
launchctl load /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
If it produced Service is disabled error, try this command to restart polio:
brew services restart polipo
Now open this address in your browser:
http://127.0.0.1:8123/polipo/config
You should see this line at the top:
configFile /Users/YourUserName/.polipo Configuration file.
If so, you need to modify ~/.polipo to configure your polipo instance.
There is another way that is not recommended. You can make your config file at /usr/local/etc/polipo/config and then create soft link to /etc/polipo/config with these commands:
mkdir /usr/local/etc/polipo/
curl -o /usr/local/etc/polipo/config https://raw.githubusercontent.com/jech/polipo/master/config.sample
sudo ln -sfv /usr/local/etc/polipo/config /etc/polipo/config
Then restart polipo and ensure that your config file location is correct. You can modify config file at /usr/local/etc/polipo/config.
I also used the brew to install polipo on Mac OS. Same problem as you met.
In fact, you need create the config file. The fail's path is ~/.polipo.
After you start the polipo service(brew services start polipo)
Open the link: http://127.0.0.1:8123/polipo/config
This is my config:
socksParentProxy = "127.0.0.1:1086"
socksParentProxy
socksProxyType = socks5
proxyAddress = "::0" # both IPv4 and IPv6
proxyPort = 8123
If polipo does not work:
I wanted to install polipo too, but even with the configuration files provided here, I was getting:
Error: polipo has been disabled because it is not supported upstream!
(MacBook Pro M1 chip. My socks proxy was generated with ssh -D 8000 -C -N myuser#statichost because of some static IP requirement).
So, I found out that you can also use an npm package to convert socks proxy to http proxy: https://www.npmjs.com/package/http-proxy-to-socks
# install hpts:
npm install -g http-proxy-to-socks
# launch http proxy:
hpts -s 127.0.0.1:8000 -p 8001
# here my socks5 proxy is at 127.0.0.1:8000 and the http proxy is now on port 8001
Npm does not support socks5 proxies, for example. So I used hpts to get an http proxy. After, I told npm to use that proxy with:
npm config set proxy http://127.0.0.1:8001
npm config set https-proxy http://127.0.0.1:8001
I'm using piwik in my localhost apache server(xampp) and configured KnpPiwikBundle, i ve set virtualhost to run two host at same time i.e my web application and piwik.
My autoload i heve defined as following ..
define('PIWIK_INCLUDE_PATH', realpath('piwik/'));
define('PIWIK_USER_PATH', realpath('piwik/'));
define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false);
require_once PIWIK_INCLUDE_PATH . "C:xampp/htdocs/piwik/index.php";
require_once PIWIK_INCLUDE_PATH . "C:/xampp/htdocs/piwik/core/API/Request.php";
Piwik_FrontController::getInstance()->init();
The following error i'm facing in webpage
"Warning: file_get_contents(/plugins/Zeitgeist/templates/simpleLayoutHeader.tpl):
failed to open stream: No such file or directory in
C:\xampp\htdocs\piwik\core\testMinimumPhpVersion.php on line 111
Warning: file_get_contents(/plugins/Zeitgeist/templates/simpleLayoutFooter.tpl):
failed to open stream: No such file or directory in
C:\xampp\htdocs\piwik\core\testMinimumPhpVersion.php on line 112
It appears the composer tool is not yet installed. You can install Composer in a few easy steps:
Download and run Composer-Setup.exe, it will install the latest Composer version and set up your PATH so that you can just call composer from any directory in your command line.
Then run this command in a terminal in the piwik directory:
$ php composer.phar update This will initialize composer for Piwik and download libraries we use in vendor/* directory. "