deploy symfony server vps in cloud - Ubuntu 16 - .htaccess

I use Apache2, Symfony 2 and PHP 7.1.
Deploy Symfony in VPS with a static IP (example 46.101.130.241:8000), no domain.
Here my config of the virtual directory:
.htaccess the project root:
Run project:
$ sudo php app/console server:start 46.101.130.241
Result:
No se puede acceder a este sitio
46.101.130.241 tardó demasiado en responder.
Buscar 101 130 241 8000 en Google
ERR_CONNECTION_TIMED_OUT
Thanks.

The built in web server, the one you started with sudo php app/console server:start 46.101.130.241 should not be used in production!!
If you want to try it out, you do not need Apache in front of it.
The recommended setup for Apache can be found in the official documentation and it requires that you have mod_php or mod_proxy_fcgi with PHP-FPM installed and configured.

Related

Facing issue while uploading the images on magento 2.4.2 Remote area

I am facing an issue in magento 2 while uploading images in magento 2 backend(admin panel). Images are uploading on tmp folder under pub folder but not able to fetch the link on backend admin panel. Its working fine on my local server. Only facing the issue on server that is on remote area with IIS server on it. Any body have solution related to it. Already tried to given permission but did not work.
Are you using any custom modules? Anyway, Try to redeploy static content. Connect server via SSH and goto Magento root directory. Run the following command (I prefer this way.)
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean

Ubuntu Desktop 20.04 - Apache2 without VirtualHost Configuration presents Website

please help me with the following problem:
I have a fresh installed Ubuntu Desktop 20.4 here and installed Apache2 from the ubuntu-repository.
For a test I disabled the 000-default.conf from the sites-enabled directory with a2dissite and removed the file 000-default.conf from the sites-available directory. "apachectl configtest" shows that the syntax is ok. "apachectl -S" shows, that there is no virtual host configuration. I have restarted the computer, but the Apache webserver still serves the standard Website. There are fresh entries in the "other_vhost_access.log". I wonder what configuration serves this website. I thought, when there is no conf-file enabled in "sites-enabled" apache doesn't serve any website?!
Where did I go wrong? Didn't find anything while searching. It's difficult to find the keywords.
Thanx for any help in advance.
Regards
Endi
Apache is serving as per config settings in the main configuration files apache2.conf or httpd.conf

OpenAM 12 installation on Windows Server 2012 hangs

During installation of OpenAM 12 running on Apache Tomcat 8, Java 8, Windows Server 2012, it hangs on non-typical for this kind of cases step like "Creating OpenAM suffixImport task".
Could that be permissions issue?
Full log:
Checking license acceptance...License terms accepted.
Checking configuration directory C:/OpenAM....Success.
Installing OpenAM configuration store...Success RSA/ECB/OAEPWithSHA1AndMGF1Padding.
Extracting OpenDJ, please wait...Complete
Running OpenDJ setupSetup command: --cli --adminConnectorPort 4444 --baseDN dc=openam,dc=forgerock,dc=org --rootUserDN cn=Directory Manager --ldapPort 50389 --skipPortCheck --rootUserPassword xxxxxxx --jmxPort 1689 --no-prompt --doNotStart --hostname localhost --noPropertiesFile Configuring Directory Server .....
...Success.
...Success
Installing OpenAM configuration store in C:/OpenAM/opends...Success.
Creating OpenAM suffixImport task 20160613174244898 scheduled to start immediately
Are you trying to install using http://localhost in the browser? That can cause issues. OpenAM wants a real FQDN.

Trying to install GitLab on Apache on CentOS 7

I'm trying to install GitLab, but I want to install it on an Apache web server on my VPS.
I know that GitLab was built for nginx, but I honestly don't want to use it. I was wondering how I would be able to have a setup so that
mysite.com would retrieve the files (like index.html, folders with more files in them, etc.) in /var/www/html
lab.mysite.com would retrieve GitLab.
I've heard you're supposed to use a virtual host, but remember, I'm still an amateur at best with this kind of stuff, so if anyone here is kind enough to make a short step-by-step guide to do this, I'd appreciate this.
Note: Before I've been using this guide to install GitLab, however this is for Nginx, so I was wondering if I was to use this guide but then add onto it, or if I'm going about this all wrong.
By default GitLab will install nginx but usually won't add nginx to your system's service manager (service or systemctl). This makes it confusing when trying to enable Apache (Apache won't start due to default port 80 in use by nginx).
Assuming you've installed Gitlab according to the default install instructions, the Nginx service will now be managed by the gitlab-ctl service manager (which is installed when installed Gitlab).
To stop Nginx, run the following from a command line as root:
gitlab-ctl stop nginx
Now that port 80 is free, you can start Apache (don't forget to install Apache if it's not already / Instructions are for RHEL systems - modify accordingly for Ubuntu etc). Assumes you are root user:
yum install -y httpd;
systemctl start httpd;
systemctl enable httpd;
Let's edit the Gitlab config file to disable nginx and tell gitlab to use apache:
vi /etc/gitlab/gitlab.rb
Add either your domain or IP to the following:
external_url 'http://git.yourdomain.com/'
Find:
# web_server['external_users'] = []
Change to (don't forget to remove the leading '#'):
web_server['external_users'] = ['apache']
Find:
# nginx['enable'] = true
Change to:
nginx['enable'] = false
And finally we have to run a "recompile" with:
gitlab-ctl reconfigure
gitlab-ctl restart
Now the Apache config. When we installed Gitlab, it added a user group called gitlab-www. We need to allow the apache user access to that group. The following assumes you've installed apache and the user apache (48) exists:
To check which group gitlab installed itself under, you can run:
getent group
Now lets modify apache's user and add it to the gitlab-www group:
usermod apache --append --groups gitlab-www
Now we need an Apache Virtual Host to point to the gitlab install.
Add a virtual host to Apache's conf.d directory (this will create a new file):
vi /etc/httpd/conf.d/gitlab.conf
Add the following (tweak according to your needs):
<VirtualHost *:80>
ServerName git.yourdomain.com
ServerSignature Off
ProxyPreserveHost On
<Location />
Order deny,allow
Allow from all
ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://git.yourdomain.com/
</Location>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
# needed for downloading attachments
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined env=!dontlog
</VirtualHost>
... And now restart Apache:
systemctl start httpd
You may run into issues with things like selinux - You can set things to permissive for debugging purposes.
setenforce 0
I hope this helps someone!

Install Wordpress / Red Hat 9

I trying to install WordPress on Redhat 9, but the server don't running PHP and return
the default Apache welcome page Default Apache Welcome Page
Any clue?
From the lack of detail in the post, I can only guess that the Apache Welcome page is showing up as you have not edited the welcome.conf.
/etc/httpd/conf.d/welcome.conf
And if the host is hosing multiple domains then you need to add a .conf for each domain to redirect the domain to the specific path on the server. Check out more details and some examples here.
Regarding the Wordpress installation and that the server doesn´t run PHP... we need more details. If there is no PHP support on the server then you can read more about it here: How to Install WordPress on CentOS 5 in five minutes flat.

Resources