Fedora 14 LAMP problem - forbidden [closed] - fedora

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just have installed Fedora 14 and install apache ( and run it ), php and mysql.
I put in /var/www/html my folder peki with php pages, but when I try to see in browser (http://localhost/peki/info.php) it is FORBIDDEN (You don't have permission to access /peki/info.php on this server). I started like superuser (service httpd start, reason for that is when I was other user starts FAILED ). How to make this work ?

You have to go into SELinux Management and Disable the "System Default Enforcing Mode", and right below that, you want to change the "Current Enforcing Mode" to Permissive, and leave "System Default Policy Type" on targeted.

You have to change the owner permission for the www folder to your user's because the default owner is root.
Here:
First fire up your terminal
Then cd to www folder
then use chown function to change owner to your username.....find out more about chown and chmod by googling them.
You're Welcome

Check if SELinux is enabled: getenforce.
Check if apache run like apache user: ps aux | grep http.
apache can read and execute /var/www/html/peki ?
apache can read and execute /var/www/html/peki/info.php ?

Related

Should config be built into a Docker image (best practice) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am currently looking to deploy a Docker application that uses an Nginx proxy and a MySQL instance (amongst other things).
What is the best practice when it comes to configuration files (in the case of Nginx) or initial table set up and server configuration (in the case of SQL)?
Is it generally better to build this config into a custom image in the Docker file (so take the standard Nginx image as a parent and copy the config into the image and build it) or to build the standard Nginx file in the docker-compose file and use volumes and bind mounts to bring the config into the image at the time of deployment? (and the analogous questions for a SQL container).
There's a bit of "it depends" here. The big question is, how much do you expect the person running the container to need to modify the configuration?
If the configuration is totally fixed then just build it into the container. A good example of this is an nginx configuration file for proxying a set of other containers in a Docker Compose setup: if you think the host names for the other containers you will use will never change, it's easier to build it into the image.
If the configuration has a limited number of things that can change, but the configuration language allows variable substitutions, then compile a config file referencing environment variables into the image, and use environment variables to adjust the configuration. The prototypical example of this in my mind is a Rails database.yml.erb file where you can substitute
host: <%= ENV['MYSQL_HOST'] %>
docker run --net some_network -e MYSQL_HOST=mysql myimage
If the configuration has a limited number of things that can change, you can also apply variable substitutions at startup time. sed can do this fine; if you otherwise have the GNU tools available (perhaps your image is Debian or Ubuntu-based) envsubst can do this straightforwardly. An entrypoint script can do this before you start the main program.
#!/bin/sh
# Fill in runtime values for configuration
sed -e "s/MYSQL_HOST/$MYSQL_HOST/" < database.conf.tpl > database.conf
# Run the CMD from the Dockerfile
exec "$#"
...
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["myapp"]
docker run --net some_network -e MYSQL_HOST=mysql myimage
If there are many complex configuration choices or you expect the user to just wholesale replace the configuration, bind-mount it in.
docker run -v $PWD/application.conf:/app/application.conf myimage
If you're actually deploying into Kubernetes you can put the configuration file in a ConfigMap object, which essentially behaves the same way as the bind-mount option. If you're also using a tool like Helm to manage the deployment then you can use its templating layer to set the ConfigMap content. The Helm templating language is fairly involved and has loops and conditionals, so you can build up a complex configuration file based on deploy-time settings.
You also mention databases. The standard SQL database containers support placing content in a /docker-entrypoint-initdb.d directory, and this will get run the very first time the database starts up. I'd minimize the use of this, and prefer creating tables via a database-migration system. Mostly this is because those scripts only get run when the database is created the very first time, and you'll need a migration system anyways; you don't want to need to delete all of your data every time you change your schema.

ERROR in ngcc is already running at process with id xxxx [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
When I try to run ng serve command in my project it produce the below error.
ERROR in ngcc is already running at process with id xxxx
Try deleting your ngcc_lock_file in the path:
node_modules/#angular/compiler-cli/ngcc/ngcc_lock_file
Or for Angular 9, the lock file to delete is:
node_modules/#angular/compiler-cli/ngcc/__ngcc_lock_file__
I had the same issue and I and deleted that file and it started working for me.
rm node_modules/#angular/compiler-cli/ngcc/__ngcc_lock_file__
Working Solution
Delete all node modules
Close any working terminal or you can shut down your PC if you cant make sure that you've closed all working terminals
run npm i to setup your modules
run ng s
It's working with me well !
The problem is most-likely a unique case.
Make sure you don't run other ng serve in parallel.
Stop current processes running and retry.
Reload your computer and try again.
If that does not help
Post a full log, so it is possible to troubleshoot your problem.

How can I display videos from my own computer on my website [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
so I have this website so far
https://imgur.com/a/o4T81MG
Looks like that. I want the play thumbnails to display video I have on my computer. I want to use my computer as a video host. I am trying to play around making a video sharing site. I plan on going down the google cloud route to host my videos but as of right now I wanted to know if its possible to use my own computer as a server to retrieve videos I have saved.
Here's one option...
Step 1: Serving the video
Super Simple Node.js Server
(install Node.js)
At a command-prompt:
Run npm install --global http-server.
Change into (cd) the directory where your videos are stored.
Run http-server.
Apache + GNU/Linux
Run a Linux VM on your computer (or use WSL if you're on Windows, or if you must install it directly follow these instructions: https://www.sitepoint.com/how-to-install-apache-on-windows/).
Install Apache (sudo apt-get install apache2 on Ubuntu; see https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-16-04).
Put your video in a directory such as /var/www/html or the equivalent for your platform (revisit the first two links for help).
Configure your new server to serve video correctly (https://stackoverflow.com/a/13341700).
Step 2: On the frontend...
Embed a element on your webpage pointing to the video on the server (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video).
🎉 You're all set up!
TL;DR: you need to serve the videos and then display them. If you want to add logic beyond that, consider building an Express web app.
You need to store your video files in a folder on a server, and then you need to reference them in your code. It's very simple to reference the videos when they are in a folder on a server.
see:
https://www.w3schools.com/html/html5_video.asp

Use mysql drivers with ejabberd without recompilation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have all the mysql .beam files needed for ejabberd. And I installed ejabberd via apt.
But when I try to copy those .beam files into /usr/lib/ebin directory and run ejabberd it echoes to ejabberd.log the following:
=INFO REPORT==== 2012-05-31 09:46:02 ===
application: ejabberd
exited: {bad_return,{{ejabberd_app,start,[normal,[]]},
{'EXIT',database_module_missing}}}
type: temporary
What I'm doing wrong?
What's the correct way of adding mysql drivers to ejabberd apt installation?
BEAM files used by ejabberd are located in a different place — try putting your files there.
As a side note: are you sure those BEAM files are really OK? Erlang is not too permissive when it comes to binary portability, so it's always advised to recompile the necessary code using the same release of Erlang as will run ejabberd on the target machine.
Check which triggers this ERROR is staightforward. It checks if hardcoded list of modules is in Erlang VM path. Make sure that odbc files are there and that they have proper file ownership. Required files are:
check_database_module(odbc) ->
check_modules(odbc, [odbc, odbc_app, odbc_sup, ejabberd_odbc, ejabberd_odbc_sup, odbc_queries]);
check_database_module(mysql) ->
check_modules(mysql, [mysql, mysql_auth, mysql_conn, mysql_recv]);
check_database_module(pgsql) ->
check_modules(pgsql, [pgsql, pgsql_proto, pgsql_tcp, pgsql_util]).

Where is the my.cnf located on a Vista? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Would anyone know where I could find the my.cnf file(s) on Vista? I am using XAMPP (C:/xampp) and I tried searching within that directory, but I can't seem to find it.
my.cnf or my.ini is probably in C:\xampp\mysql\
If not there, you can try the following, which I found here:
To find these MySQL config files, do this:
Go to Folder Options: in any folder, go to the top horizontal main text menu >> Tools >> Folder Options
Enable 'View Hidden Files and Folders', and 'View Protected System Files', save & exit
Go to C Drive, locate and rename the my.ini file, which will now be visible. Rename it as my.ini.bak
Go to /xampp/msql/bin - locate and rename my.cnf, to my.cnf.bak
If there is no file my.cnf, but there is one called my - then that is the one you want. Rename it to my.cnf.bak