I have two laravel projects tord and milo in lol folder
var/www/html/lol
-tord
-app
-bootstrap
-...
-milo
-app
-bootstrap
-...
Now, accessing both projects via URL http://localhost/lol/tord/public or http://localhost/lol/milo/public results in:
Not Found
The requested URL was not found on this server.
However if i move both project outside the lol directory and access it via url
http://localhost/tord/public or http://localhost/milo/public
works fine
NOTE : I've already enabled apache2 rewrite mode and also added below override configuration in default 000.default.conf file
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
Related
I have tried many solutions which are given in Stack Overflow and it's not working anymore. My Magento version is 1.5. Why am I getting this issue after I tried all the solution for admin?
make sure that you have used index.php in url before admin route name.This is needed if url rewrites are enabled.
index.php before /admin or any suffix you have
For Ubuntu edit the file /etc/apache2/apache2.conf
To edit this file use
sudo vi /etc/apache2/apache2.conf command
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
After this run command
sudo service apache2 restart
IF STILL ADMIN SHOW 404 NOT FOUND, Add htaccess file
1) Add .htaccess at root of magento
I'm trying to build a web app in laravel 5.2 on windows platform with wamp server installation.
I'm trying to call a dashboard page by following routes:
Route::get('nitsadmin/dashboard', function () {
return view('nitsadmin.dashboard');
});
Following is the route list:
where my file structure is as below:
My virtual host configuration in httd-vhosts.conf file:
<VirtualHost *:80>
DocumentRoot "c:\wamp\www\nitsedit\public"
ServerName nitseditor.dev
</VirtualHost>
Apache alias:
Alias /nitseditor.dev "C:/wamp/www/NitsEdit/public"
<Directory "C:/wamp/www/NitsEdit/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
Don't know where I'm getting problem but I'm getting following error:
You have wrong web server configuration, just point web server to a public directory in Lararel project root and restart web server.
You're using the wrong URL, ditch the "nitsedit\public" part:
http://nitseditor.dev/nitsadmin/dashboard
Apache is already pointing the user to the public folder.
Just commented out Include conf/extra/httpd-vhosts.conf in the file httpd.conf present in folder wamp/bin/apache/apache2.4.9/conf and it worked.
I'm starting to learn how to set up a lamp on a vps, and i'm trying to run a laravel project.
This is my 000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
Alias /laravelproject /var/www/laravelproject/public
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
I'm trying to access using the /laravelproject and it works cause i'm redirected to a login page ip/laravelproject/login (like I set using the middleware for not logged users and it works on my local homestead virtual machine). But i got a 404 file not found error. Not a pretty designed laravel one, but a raw and ugly server error
Not Found
The requested URL /laravelproject/login was not found on this server.
Apache/2.4.10 (Ubuntu) Server at '' Port 80
Of course i don't have any laravelproject.com domain to set up, i want to access it simply with my_server_ip/laravelproject.
How can i set up a virtualhost or an alias to run it with all the routes working?
You could also try enabling apache mod-rewrite if not enabled yet.
sudo a2enmod rewrite
sudo systemctl restart apache2
You'll need to make sure the /var/www/laravelproject/public directory is set to AllowOverride All (which I believe you have taken care of by setting /var/www to All). Then make sure the .htaccess file in your public directory is correctly set up: https://github.com/laravel/laravel/blob/master/public/.htaccess
this is because Apache is looking for /public/login/index.html which is not a file. Laravel's .htaccess redirects these requests appropriately, but it has to be in your public folder and Apache has to AllowOverride
edit:
<Directory /var/www/laravelproject/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
I was hoping to get help on an issue that I am having. I am trying to deploy Flask to an Apache server. My flask uses the render template function in order to display HTML pages. I've gotten it to work on my Localhost, but now as I am trying to deploy it to the Apache server, but I am not sure about where to put the HTML files for flask to recognize. I setup my mod_wsgi to work properly with displaying a flask file that does not use HTML files, but could someone tell me where to place the files and what I am supposed to type into the httpd.conf file? Thanks you for reading my post
This is how my httpd file is set up with the wsgi, static and template tht isnt working
httpd.conf:
WSGIScriptAlias /wsgi "C:/wsgi_app/test.wsgi"
<Directory "C:/wsgi_app">
AllowOverride None
Options None
Order deny,allow
Allow from all
</Directory>
Alias /static "C:/wsgi_app/static"
<Directory "C:/wsgi_app/static">
AllowOverride None
Options None
Order deny,allow
Allow from all
</Directory>
Alias /templates "C:/wsgi_app/templates"
<Directory "C:/wsgi_app/templates">
AllowOverride None
Options None
Order deny,allow
Allow from all
</Directory>
This is the current setup for where my files are
File Directory:
--C://
--wsgi-app/
--test.wsgi
--test.py
--static/
--templates/
From a live magento setup I made a tar.gz, moved that to an domains of another DirectAdmin user, extracted the tar.gz, copied the database, changed the URL of domain in the database. Front-end works good.
Backend gives me the following error:
Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.”
I already check the folder and file permission. Also tried to change the rights from the user:group settings with SSH access to the same user as the DirectAdmin user name. But that did not work either.
Note that this installation is on the same server as the live environment.
Live: (working) http://imageshack.us/photo/my-images/197/nrhj.png/
Test: (not working) http://imageshack.us/photo/my-images/542/uklz.png/
Specifically check the permissions on app/etc/local.xml as usually this means it is world readable.
Also, there is supposed to be a .htaccess file in app/etc/ that denies the contents from being served out by the web server. Check just in case your tar backup didn't include it. Usually this problem comes about from using an FTP client to do the transfer that has had hidden file visibility turned off.
For Apache 2.4.x you have to add Require all granted So it would look something like this:
<Directory /var/www/magento>
AllowOverride All
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
Source: Apache: client denied by server configuration
Im using a Debian 7 with Apache 2.2.22 and Magento 1.9.1, adding
<Directory /var/www/magento/>
AllowOverride All
</Directory>
in /etc/apache2/sites-available/default
works for me
Similar to John Veldboom's answer I added this to /etc/apache2/apache2.conf since my magento install was in a different directory /var/www/html (eg. the directory path is wherever magento was extracted):
<Directory /var/www/html/>
AllowOverride All
Require all granted
</Directory>
With the following apache2 and ubuntu distro:
root#test-VirtualBox:/var/www/html# dpkg -l apache2 && lsb_release -a
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii apache2 2.4.7-1ubunt amd64 Apache HTTP Server
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
I had this issue on Debian and found my server-level site config (in /etc/apache2/sites-available/default) had AllowOverride None set. Changing that line to AllowOverride All fixed it.
Thanks Haselnussstrauch, your answer worked for me. My setting was in apache2.conf
sudo nano /etc/apache2/apache2.conf
Change the default AllowOverride None to AllowOverride All
<Directory /var/www/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Then restart Apache:
sudo service apache2 restart
Many other places suggest that you can block ip addresses to your server by adding this to your httpd.conf
<Location />
order allow,deny
allow from all
deny from aa.bb.cc.dd
</Location>
however this for some reason causes all other .htaccess files to be ignored, including .htaccess files that are in place to protect magento.
I have fixed issue, there is no .htaccess fine inside sub folder (especially app).