WampServer Hosts file not exit - wampserver

There is a problem with my wamp server after i install it. However, my wamp server still as normal but may i know how to correct this errors?
errors as below:
The file: C:/WINDOWS/system32/drivers/etc/hosts is not writable
The file C:/WINDOWS/system32/drivers/etc/hosts does not exists
May i know how to correct it ?

Check this C:/WINDOWS/system32/drivers/etc path, your hosts file is probably missing. Just follow these steps to fix the problem.
Create new text file on desktop and rename it to "hosts". Don't add extension.
Open it with any text editor, paste the following code and save it.
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Now move the file to C:/WINDOWS/system32/drivers/etc folder.
Exit WAMP if its running and start it again. The error will be gone.
for more detail checkout Microsoft support article here: https://support.microsoft.com/en-us/help/972034/how-to-reset-the-hosts-file-back-to-the-default

Related

How can I tell what options are in use on a running Mosquitto Service

How can I tell if the settings files associated with a Mosquitto instance, have been properly applied?
I want to add a configuration file to the conf.d folder to override some settings in the default file, but I do not know how to check they have been applied correctly once the Broker is running.
i.e. change persistence to false (without editing the standard file).
Test it.
You can run mosquitto with verbose output enabled, which will generally give you feedback on what options were set, but don't just believe that.
To do that, stop running Mosquitto as a service (how you do this depends on you setup) and manually run it from the shell with the -v option. Be sure to point it at the correct configuration file with the -c option.
That's not enough to be sure that it's actually working properly. To do that you need to test it.
Options have consequences or we wouldn't use them.
If you configure Mosquitto to listen on a specific port, test it by trying to connect to that port.
If you configure Mosquitto to require secure connections on a port, test it by trying to connect to the port unsecured (this shouldn't work) and secured (this should work).
You should be able to devise relatively simple tests for any options you can set in the configuration file. If you care if it's actually working, don't just take it on faith; test it.
For extra credit you can bundle the tests up into a script so that you can run an entire test suite easily in the future and test your Mosquitto installation anytime you make changes to it.
Having duplicate configuration options with different values is a REALLY bad idea.
The behaviour of mosquitto is not defined in this case, which value should be honoured, the first found, the last? When using the conf.d directory, what order will the files be loaded in?
Also will you always remember that you have changed the value in a conf.d file in the future when you go looking?
If you want to change one of the defaults in the /etc/mosquitto/mosquitto.conf file then edit that file. (Any sensible package management system will notice the file has been changed and ask what to do at the point of upgrade)
The conf.d/ directory is intended for adding extra listeners.
Also be aware that there really isn't a default configuration file, you must always specify a configuration file with the -c command line option. The file at /etc/mosquitto/mosquitto.conf just happens to be the config file that is passed when mosquitto is started as a service when installed using most Linux package managers. (The default Fedora install doesn't even setup the /etc/mosquitto/conf.d directory)

jenkins not reading config file

I am trying to get Jenkins to use https I have created my JKS file and I have amended the /etc/default/jenkins file. I have set http_port=-1 and have changed the last line in the file to someting similar to :-
JENKINS_ARGS=” — httpPort=-1 — httpsPort=8443 — httpsKeyStore=/path/to/jenkins.jks — httpsKeyStorePassword=chosen_pass — httpsListenAddress=0.0.0.0"
replacing the path to jenkinks with the relevant path and password with correct password.
When I restart jenkins it just defaults to port 8080 on http. It seems to ignore the modifications to this field
Has anyone see this before. Am I editing the correct file?? I am on Ubuntu 18.

Add TeX path to R Studio - Ubuntu

I'm having the same issue as this question:
When I open any .Rnw file, R Studio says that I have no TeX Distribution installed: I'm using Ubuntu 14.04 w/ Gnome and TeXLive 2014.
I include the line PATH=/usr/local/texlive/2014/bin:${PATH} in the Renviron.site file, which now looks like:
## Emacs please make this -*- R -*-
## empty Renviron.site for R on Debian
##
## Copyright (C) 2008 Dirk Eddelbuettel and GPL'ed
##
## see help(Startup) for documentation on ~/.Renviron and Renviron.site
# ## Example ~/.Renviron on Unix
# R_LIBS=~/R/library
# PAGER=/usr/local/bin/less
# ## Example .Renviron on Windows
# R_LIBS=C:/R/library
# MY_TCLTK="c:/Program Files/Tcl/bin"
# ## Example of setting R_DEFAULT_PACKAGES (from R CMD check)
# R_DEFAULT_PACKAGES='utils,grDevices,graphics,stats'
# # this loads the packages in the order given, so they appear on
# # the search path in reverse order.
PATH=/usr/local/texlive/2014/bin:${PATH}
However the problem persists. How can I fix this and run Sweave or knitR?
If anyone faces the same problem, I opened R Studio and checked the pdflatex installation with
> Sys.which("pdflatex")
pdflatex
""
Which show that it is in fact empty, so I run the command Sys.getenv("PATH")to check the current PATH:
Sys.getenv("PATH")
[1] "/usr/local/texlive/2014/bin:/usr/local/texlive/2014/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
To add my pdflatex Path, I had to find the pdflatex file on my texlive directory, which was /usr/local/texlive/2014/bin/x86_64-linux, then I added this to my current Path:
> Sys.setenv(PATH=paste(Sys.getenv("PATH"),"/usr/local/texlive/2014/bin/x86_64-linux",sep=":"))
And now it works perfectly
EDIT: the solution above works only for the open session and is only temporary, you have to run the code everytime you open a new session. I'm still trying to find a permanent solution
see this page: Customizing Startup, modify this file /usr/lib/R/etc/Rprofile.site, and put your code in this file. It looks like a permanent solution maybe.
===
i saw this file /etc/environment is the same as the output of Sys.getenv("PATH"), so i think that sys.getenv("PATH") reads file /etc/environment.
Therefore the better way is to modify this file /etc/environment adding this code :/usr/local/texlive/2017/bin/x86_64-linux​.
after i did it, i tried source /etc/envronment and restarted Rstudio, but it didn't work.
Finally it makes sense after i restarted my ubuntu system. ^_^
I hope my poor English expression is clear enough.

Setting enviorment variables in Informix database to start

i have installed Informix database server(11.70) successfully.but get problems in starting the DB server.when i run it give me error.
Warning: could not access INFORMIXSQLHOSTS /opt/IBM/informix1/etc/sqlhosts.
How to create this sqlhosts file and what is the exact content of this file.in my etc directory i have some similar files named :
sqlhosts.cmsm.sample
sqlhosts.cmsm.sample.all
sqlhosts.cmsm.sample.client
sqlhosts.cmsm.sample.er
sqlhosts.demo
sqlhosts.ol_informix1170_1
sqlhosts.std
but there is no file named sqlhosts in /etc/ folder.please guideline how to prepare this file ??
I suppose you created the instance during the install process. From your file list I suspect that the name was "ol_informix1170_1". I'd say, but I cannot be 100% sure that in order to setup the environment for your Informix instance, you need (as a minimum) set the following:
INFORMIXDIR=/opt/IBM/informix1
INFORMIXSQLHOSTS=/opt/IBM/informix1/etc/sqlhosts.ol_informix1170_1
ONCONFIG=onconfig.ol_informix1170_1 #check if this file exists (in $INFORMIXDIR/etc)
INFORMIXSERVER=ol_informix1170_1 #check that this is the value of the SERVERNAME in the previous file
PATH=$PATH:$INFORMIXDIR/bin
export INFORMIXDIR INFORMIXSERVER ONCONFIG INFORMIXSQLHOSTS PATH
Regards

User specific URL Redirection With Lighttpd

Apache web hosts have a user-configurable ~/.htaccess file that allows local redirects, for example, www.awesomesite.com => www.awesomesite.com/launchmyawesomeapp.cgi
In lighttpd I know there is a global /etc/lighttpd.conf file, but is there something local like the Apache htaccess file?
thanks,
joe
You could use lighttpd's include_shell command to include a config from all user's /home/ directory. You specify an executable (binary) optional with paramenter if you call an interpreter here. That program/script returns lighttpd-config formated text. To be able to restart lighttpd on config change you'd need a daemon or a cronjob for it (check for timestamp changes). This is, as far as I know, because lighttpd loads configs only on startup.

Resources